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

Build Incredible Chatbots

Build Incredible Chatbots

Sources: udemy
Welcome to the most comprehensive and complete chatbot developer course. Learn concepts, tools and techniques that you will need
7 hours 51 minutes
Learn JavaScript (Everything packet)

Learn JavaScript (Everything packet)

Sources: Zell Liew
Master JavaScript with a proven method that guarantees success. JavaScript is one of the most important skills for a front-end developer. When you have a...
36 hours 27 minutes 55 seconds
20 Web Projects With Vanilla JavaScript

20 Web Projects With Vanilla JavaScript

Sources: udemy, Brad Traversy
This is a fun, practical & project based course for all skill levels. The projects in this course are designed to get you building things using HTML5, CSS & JavaScript with no ...
16 hours 8 minutes 55 seconds
Learn HTML Canvas - Pixels, Particles & Physics

Learn HTML Canvas - Pixels, Particles & Physics

Sources: udemy
Learn the fundamentals of HTML canvas and discover how to develop, draw, and animate visuals and images with vanilla JavaScript. No frameworks and no libraries.
2 hours 15 minutes 38 seconds