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!
Overview
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