Welcome to
Pain Free Mocking with Jest
Course Syllabus and Content
Pain Free Mocking with Jest teaches you how to effectively and painlessly test JavaScript applications with Jest. You'll start by learning how to write unit and integration tests as well as the 'How', 'What', and 'When' of Mocks, Stubs, and Spies. Then we'll move to more advanced technique and strategies you'll be using for the rest of your career, including how to have a hollistic approach to testing and how to automatically add your tests in the development lifecycle.
Introduction
6 Lessons 20 Minutes
Everything you need to know to start testing with Jest. You'll set up your environment, learn how to think like a tester with the Testing Pyramid and you'll even write your first test!
Introduction to Pain Free Mocking with Jest
Development environment setup
Why automated testing is important
Test classification using the test pyramid
What is Jest
Basic application with jest setup
Getting started with mocking and unit testing
13 Lessons1 Hours 2 Minutes
Get started with unit testing and mocking. Write more unit tests, learn how, when, and why to use mocks, stubs, and spies, mock databases and participate in some fun testing exercises.
How to mock MongoDB integration
How to test Express controller functions using unit testing principles
Getting started with integration testing
9 Lessons 37 Minutes
Get started with integration testing. Separate the database from your tests, learn how to test HTTP endpoints, run parallel tests, mock API integrations and participate in even more fun exercises.
How to use a separate test database instance for testing purposes
Advanced mocking and integration testing
5 Lessons 18 Minutes
Learn advanced mocking and testing techniques. Test complex edge cases like slow or inconsistent networks and learn how to create consistent testing environments with test containers.
Testing strategy
5 Lessons 14 Minutes
Become a test strategist by learning about test costs, maintainability and how to have a hollistic testing approach with the Agile Testing Quadrant. Add your tests to the development cycle by setting up Git hooks with Husky and CI pipelines with GitHub actions.
Conclusion
1 Lesson 1 Minutes
You did it! By now you'll feel confident testing JavaScript applications with Jest because you have all the knowledge and tools you need to test applications in the real world without headaches.