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

JavaScript: The Advanced Concepts

JavaScript: The Advanced Concepts

Sources: udemy, zerotomastery.io
After many years of working with the language, Andrei has taken decades of experience, combining best practices from some of the top developers in the world, to get you to becom...
25 hours 9 minutes 23 seconds
The Ultimate JavaScript Animation Course

The Ultimate JavaScript Animation Course

Sources: developedbyed.com
Learn how to do creative and engaging animation with no previous experience. Animation is so important in front end design as it grabs the attention of the user and provides eng...
8 hours 32 minutes 37 seconds
Zero to Full Stack Hero

Zero to Full Stack Hero

Sources: papareact.com
PAPA React presents.. Zero to Full Stack Hero. It's NOT just another COURSE. It's the world's BEST COMMUNITY. From learning the Basics of Web Development to Mastering React!
101 hours 29 minutes 59 seconds