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

Make a Google search engine clone: JavaScript PHP and MySQL

Make a Google search engine clone: JavaScript PHP and MySQL

Sources: udemy
Do you want to become an expert in JavaScript, PHP and MySQL?Do you want to build a real search engine just like Google? If so, you’re in the right place!
5 hours 47 minutes 11 seconds
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
The Complete JavaScript Course 2023: From Zero to Expert!

The Complete JavaScript Course 2023: From Zero to Expert!

Sources: udemy
This is a truly complete JavaScript course, that goes beyond what other JavaScript courses out there teach you.
68 hours 53 minutes 44 seconds
Youtube clone

Youtube clone

Sources: Nomad Coders
What is "clone coding"? Services that actually exist. Sweat. Sweat. Practical 100% educational method to learn while creating Clone coding is a way of learning while creating re...
15 hours 41 minutes 20 seconds
GraphQL for beginners with JavaScript

GraphQL for beginners with JavaScript

Sources: udemy
Obviously, you should use the right tool for the job, right? ... but often, what was the “right” tool, becomes the inferior tool, and frequently you
5 hours 35 minutes 31 seconds