The Jest Handbook

Take your JavaScript testing skills to the next level with the Advanced Jest Guide.

  1. Gain a deep understanding of the options available to the Jest CLI and how to use different views to write and debug tests more effectively.
  2. Leverage spying, stubbing and module import interception functionality in tests and create mock JavaScript object instances, stub ES6 classes and mock out global objects.
  3. Use and contrast 2 approaches to testing backend applications with Jest as well as illustrate synchronous and asynchronous testing patterns.
  4. Employ advanced Jest partial matchers to write tests with high specificity and reduce toil when updating application code.
  5. Leverage Jest’s built-in coverage tool to set minimum coverage thresholds, find parts of the code that aren’t tested and how to disable it in specific cases.
Jump to table of contents