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

Grokking JavaScript Fundamentals

Grokking JavaScript Fundamentals

Sources: DesignGurus.io
Start learning JavaScript from scratch. This course is ideal for those who want to master programming and web development without any prior experience.
Create Animated Breaking News Graphics with HTML, CSS and JavaScript

Create Animated Breaking News Graphics with HTML, CSS and JavaScript

Sources: zerotomastery.io
Master the creation of dynamic overlays and animations for streams, scoreboards, and TV graphics. Learn the principles of working with animation and web technol
2 hours 40 minutes 39 seconds
Object-oriented Programming in JavaScript

Object-oriented Programming in JavaScript

Sources: codewithmosh (Mosh Hamedani), udemy
Object-oriented programming (OOP) is a popular programming paradigm or style of programming. It’s been around since ‘70s, but unlike tools and frameworks that c
3 hours 53 minutes 46 seconds
Data Visualization + D3.js

Data Visualization + D3.js

Sources: superhi.com
Our Data Visualization course focuses on the practical aspects of working with data. In our 6-week long course, we’ll cover the basics of storytelling and worki
16 hours 48 minutes 54 seconds