Show Sidebar
Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Mastering JavaScript Unit Testing
Getting Started (7m)
1- Welcome (1:22)
2- Prerequisites (0:41)
3- Course Structure (2:15)
4- How to Take This Course (0:58)
5- Setting Up the Testing Environment (0:33)
6- Starter Project (0:54)
Introduction to Unit Testing (52m)
1- Introduction (1:39)
2- What is Unit Testing (5:21)
3- Types of Tests (3:14)
4- Choosing a Testing Framework (1:39)
5- Setting Up Vitest (1:14)
6- Writing Your First Tests (9:20)
7- Exercise: Testing fizzBuzz (5:56)
8- Test-driven Development (7:10)
9- Exercise: Testing Factorial (5:01)
10- Running Tests (4:23)
11- Navigating Tests in VSCode (4:11)
12- Code Coverage (4:33)
13- Summary
Core Unit Testing Techniques (80m)
1- Introduction (0:54)
2- Characteristics of Good Unit Tests (4:24)
3- Using Matchers (3:06)
4- Writing Good Assertions (7:17)
5- Exercise: Testing getCoupons (9:00)
6- Positive and Negative Testing (7:19)
7- Exercise: Testing validateUserInput (7:18)
8- Boundary Testing (2:57)
9- Exercise: Testing isValidUsername (5:45)
10- Exercise: Testing canDrive (6:35)
11- Parameterized Tests (4:56)
12- Exercise: Parameterized Tests (4:20)
13- Testing Asynchronous Code (4:29)
14- Setup and Teardown (2:42)
15- Exercise: Testing a Stack (9:54)
16- Summary
Breaking Dependencies with Mocks (53m)
1- Introduction (0:31)
2- Creating Mock Functions (5:38)
3- Exercise: Working with Mock Functions (1:52)
4- Mocking Modules (5:01)
5- Exercise: Testing getShippingInfo (5:28)
6- Interaction Testing (3:23)
7- Exercise: Testing submitOrder (6:52)
8- Partial Mocking (7:32)
9- Spying on Functions (5:37)
10- Clearing, Resetting, and Restoring Mocks (4:55)
11- To Mock or Not to Mock (1:15)
12- Mocking Dates (3:51)
13- Exercise: Testing getDiscount (1:55)
14- Summary
Improving Code Quality with Static Analysis Tools (36m)
1- Introduction (0:33)
2- What are Static Analysis Tools (1:12)
3- Formatting Code with Prettier (5:10)
4- Linting Code with ESLint (9:52)
5- Catching Type Errors with TypeScript (6:32)
6- Running ESLint on TypeScript (6:13)
7- Automating Code Quality Checks with Husky (3:56)
8- Running Tests on Push (1:33)
9- Summary
Conclusion (2m)
1- Course Wrap Up (0:25)
2- Course Summary
3- What's Next?
4- Feedback
4- Choosing a Testing Framework
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock