Skip to main content

Mastering JavaScript Unit Testing

3h 51m 31s
English
Free

Course description

A comprehensive, beginner-friendly guide covering everything from the basics to advanced techniques. Tired of piecing together disconnected tutorials or dealing with rambling, confusing instructors? This course is for you! It's perfectly structured into a series of bite-sized, easy-to-follow videos that cover both theory and practice.

Read more about the course
  1. Explore the fundamentals of unit testing and its benefits.
  2. Master core unit testing techniques and best practices.
  3. Craft maintainable, robust, and trustworthy tests that deliver value.
  4. Learn to execute and navigate tests effectively in VSCode.
  5. Perform positive, negative, and boundary testing for comprehensive coverage.
  6. Evaluate code coverage to ensure comprehensive testing.
  7. Create parameterized tests for versatile testing scenarios.
  8. Isolate code with mocks and learn when to use them.
  9. Spy on functions to gain insights into their behavior.
  10. Improve code quality using static analysis tools.
  11. Utilize Prettier to format your code consistently.
  12. Implement ESLint to catch code quality issues early.
  13. Prevent type errors in your code using TypeScript.
  14. Automate code quality checks using Husky.

Watch Online

0:00 0:00
#Lesson TitleDuration
1Welcome01:23
2Prerequisites00:42
3Course Structure02:16
4How to Take This Course00:59
5Setting Up the Testing Environment00:34
6Starter Project00:55
7Introduction01:40
8What is Unit Testing05:22
9Types of Tests03:15
10Choosing a Testing Framework01:40
11Setting Up Vitest01:15
12Writing Your First Tests09:21
13Exercise: Testing fizzBuzz05:57
14Test-driven Development07:11
15Exercise: Testing Factorial05:02
16Running Tests04:24
17Navigating Tests in VSCode04:12
18Code Coverage04:34
19Introduction00:55
20Characteristics of Good Unit Tests04:25
21Using Matchers03:07
22Writing Good Assertions07:18
23Exercise: Testing getCoupons09:01
24Positive and Negative Testing07:20
25Exercise: Testing validateUserInput07:19
26Boundary Testing02:58
27Exercise: Testing isValidUsername05:46
28Exercise: Testing canDrive06:36
29Parameterized Tests04:57
30Exercise: Parameterized Tests04:21
31Testing Asynchronous Code04:30
32Setup and Teardown02:43
33Exercise: Testing a Stack09:55
34Introduction00:32
35Creating Mock Functions05:39
36Exercise: Working with Mock Functions01:53
37Mocking Modules05:02
38Exercise: Testing getShippingInfo05:29
39Interaction Testing03:24
40Exercise: Testing submitOrder06:53
41Partial Mocking07:33
42Spying on Functions05:38
43Clearing, Resetting, and Restoring Mocks04:56
44To Mock or Not to Mock01:16
45Mocking Dates03:52
46Exercise: Testing getDiscount01:56
47Introduction00:34
48What are Static Analysis Tools01:13
49Formatting Code with Prettier05:11
50Linting Code with ESLint09:53
51Catching Type Errors with TypeScript06:33
52Running ESLint on TypeScript06:14
53Automating Code Quality Checks with Husky03:57
54Running Tests on Push01:34
55Course Wrap Up00:26

Books

Read Book Mastering JavaScript Unit Testing

#Title
11- Introduction to Unit Testing
22- Core Unit Testing Techniques
33- Breaking Dependencies with Mocks
44- Improving Code Quality using Static Analysis Tools

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

DevOps.js Conference 2021

DevOps.js Conference 2021

Sources: devopsjsconf.com
DevOps.js is an event for all the developers and architects involved in building infrastructure and setting up pipelines and deployments for JavaScript applications. Would you l...
7 hours 51 minutes 4 seconds
Web security: Injection Attacks with Java & Spring Boot

Web security: Injection Attacks with Java & Spring Boot

Sources: udemy
Are you a Java web developer and want to write secure code? Do you want to learn Ethical hacking and Web application security? With this hands-on injection attacks course you w...
8 hours 44 minutes 36 seconds
Modern JavaScript From The Beginning 2.0

Modern JavaScript From The Beginning 2.0

Sources: Brad Traversy
This is a 37+ hour in-depth course that will take you from the absolute beginning of JavaScript, learning about data types, functions and loops to learning DOM
36 hours 42 minutes 18 seconds