Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Frontend Masters

JavaScript Testing Practices and Principles

via Frontend Masters

Overview

Learn the principles and best practices for writing maintainable test applications to catch errors before your product reaches the end user! Follow along with Kent C. Dodds and learn the fundamentals behind tests and testing frameworks, the distinctions of different forms of testing and when to use them appropriately to ensure your tests give you the confidence you need. You will also learn to write unit and integration tests with the popular Jest testing framework, mock dependencies, and use test-driven development to write new features and help find bugs!

Syllabus

  • Introduction
  • Automated Testing
  • Your First Test Exercise
  • Your First Test Solution
  • Coding an Assertion Library
  • Coding a Testing Framework
  • Jest Testing Framework
  • Course Code Walkthrough
  • Unit Test Demo
  • Writing a Basic Unit Test Exercise
  • Writing a Basic Unit Test Solution
  • Test Factories & Colocating Tests Q&A
  • Code Coverage
  • Monkey Patch a Mock Exercise
  • Monkey Path a Mock Solution
  • Asserting Calling a Mock Exercise
  • Asserting Calling a Mock Solution
  • Using Jest spyOn
  • Using Jest Mock
  • Jest Q&A
  • Using a __mocks__ directory
  • More Mocking with Users
  • Unit Tests for Express Middleware
  • Unit Tests for Express Middleware Solution
  • Test Object Factories
  • Test-Driven Development
  • Test-Driven Development Solution
  • Basic Integration Test for a Node Server
  • Additional Resources and Q&A

Taught by

Kent C. Dodds

Reviews

Start your review of JavaScript Testing Practices and Principles

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.