Pain Free Mocking with Jest

Pain Free Mocking with Jest

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 39 Lessons (2h 37m) | 313 MB

Learn to confidently test JavaScript applications and mock dependencies using Jest, the pain-free way.

Understand how to painlessly use Mocks, Spies, and Stubs to test any part of your application, without worrying about Databases, APIs and Security Tokens.

After finishing this course (which only takes a single afternoon), you’ll feel confident in your testing skills because you’ll have all the knowledge and tools you need to effectively and painlessly test even complex applications in the real world without headaches.

WHAT YOU WILL LEARN

  • How to write unit and integration tests with Jest
  • How to test functions that interact with Controllers, APIs, and Databases (without relying on their responses)
  • How to test code in isolation with Mocks, Spies, and Stubs using Mockingoose
  • How to write integration tests for HTTP endpoints and database connections
  • Advanced mocking and integration testing techniques like the 3A pattern, network manipulation, and more
  • How to become a test strategist with the Agile Testing Quadrant, create CI test pipelines, and add tests to the development lifecycle
Table of Contents

1 Course Introduction
2 Prerequisites
3 Importance of automated testing
4 The testing pyramid
5 What is Jest
6 Application setup
7 What is unit test
8 Entry and exit points
9 First unit test
10 Naming and organizing tests
11 Exercise 1 (Testing for Hash Password Functions)
12 Exercise 1 solution (Testing for Hash Password Functions)
13 Set up Jest extension
14 Introduction to Test Doubles
15 Mock database
16 Unit test express controller
17 Exercise 2
18 Exercise 2 solution
19 Test coverage
20 What is integration test
21 Separate database for testing purposes
22 Test HTTP endpoint
23 Parallel tests and database connection
24 Database connection and parallel tests
25 Exercise 1 (Testing the Login Controller)
26 Exercise 1 solution (Testing the Login Controller)
27 Mock API integration using Jest
28 Mock API integration using Jest_2
29 Introduction to test containers
30 Setup test containers
31 How to mock the dynamic split join pattern
32 How to mock slow network
33 How to mock network failures
34 Test costs and maintainability
35 Version control checks
36 Create CI-CD pipeline
37 Note on code coverage
38 Agile testing quadrant
39 Conclusion

Homepage