\newline Logo
Left arrow icon.
Course Thumbnail of Pain Free Mocking with Jest.Pain Free Mocking with Jest
  • MODULE 1
    Introduction

    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!

    • LESSON 1.1Course Introduction
    • LESSON 1.2Prerequisites
    • LESSON 1.3Importance of automated testing
    • LESSON 1.4The testing pyramid
    • LESSON 1.5What is Jest
    • LESSON 1.6Application setup
  • MODULE 2
    Getting started with mocking and unit testing

    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.

    • LESSON 2.1What is unit test
    • LESSON 2.2Entry and exit points
    • LESSON 2.3First unit test
    • LESSON 2.4Naming and organizing tests
    • LESSON 2.5Exercise 1 (Testing for Hash Password Functions)
    • LESSON 2.6Exercise 1 solution (Testing for Hash Password Functions)
    • LESSON 2.7Set up Jest extension
    • LESSON 2.8Introduction to Test Doubles
    • LESSON 2.9Mock database
    • LESSON 2.10Unit test express controller
    • LESSON 2.11Exercise 2
    • LESSON 2.12Exercise 2 solution
    • LESSON 2.13Test coverage
  • MODULE 3
    Getting started with integration testing

    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.

    • LESSON 3.1What is integration test
    • LESSON 3.2Separate database for testing purposes
    • LESSON 3.3Test HTTP endpoint
    • LESSON 3.4Parallel tests and database connection
    • LESSON 3.5Database connection and parallel tests
    • LESSON 3.6Exercise 1 (Testing the Login Controller)
    • LESSON 3.7Exercise 1 solution (Testing the Login Controller)
    • LESSON 3.8Mock API integration using Jest
    • LESSON 3.9Mock API integration using Nock
  • MODULE 4
    Advanced mocking and integration testing

    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.

    • LESSON 4.1Introduction to test containers
    • LESSON 4.2Setup test containers
    • LESSON 4.3How to mock the dynamic split join pattern
    • LESSON 4.4How to mock slow network
    • LESSON 4.5How to mock network failures
  • MODULE 5
    Testing strategy

    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.

    • LESSON 5.1Test costs and maintainability
    • LESSON 5.2Version control checks
    • LESSON 5.3Create CI/CD pipeline
    • LESSON 5.4Note on code coverage
    • LESSON 5.5Agile testing quadrant
  • MODULE 6
    Conclusion

    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.

    • LESSON 6.1Conclusion
Right arrow icon.
Go to Next Lesson
Go to Next Lesson
LESSON 1.2Prerequisites
  • Go Pro
  • Courses
  • Pain Free Mocking with Jest
  • Course Introduction
  • Go To Next Lesson
    Prerequisites
    Prerequisites

    Development environment setup