liveBook · Manning

Jest

Jest is a JavaScript testing framework for defining, running, and asserting automated tests.

How 5 Manning books explain it

The Art of Unit Testing 3e

Jest is a JavaScript testing framework that provides facilities for writing, running, and reporting tests.

How it is used
Provides a single framework for writing, asserting, running, and reporting JavaScript tests.
How deep it goes
Explains setup, execution reports, test structure, reuse trade-offs, reporting adapters, and dynamic module fakes.
Examples
Uses Hello World test output and a Password Verifier that stubs configuration while verifying logger calls.
What you can do after
Apply it via Jest to run tests, interpret failures, watch changes, organize tests, and fake directly imported modules.

Read how The Art of Unit Testing 3e explains Jest →

Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

Jest is a JavaScript testing framework for running automated tests.

How it is used
Runs automated JavaScript tests for libraries and individual microservices.
How deep it goes
Works through installation, configuration, test execution, and mocked microservice unit tests; leaves Jest’s wider API unexplored.
Examples
Uses a math library test and metadata microservice tests for startup and database-backed route behavior.
What you can do after
Apply it via Jest to run and watch JavaScript tests and isolate a microservice from its server and database.

Read how Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform explains Jest →

Modern Angular

Jest is a JavaScript testing framework and test runner for executing automated tests, typically in a Node.js environment.

How it is used
Executes Angular unit tests and reports their results within a Node.js-based testing environment.
How deep it goes
Provides setup files, project configuration, lifecycle structure, and component examples, but defers comprehensive service and browser-API testing.
Examples
Uses AppComponent specs, TestBed fixtures, ng test, configuration files, HttpClient failures, and Karma-to-Jest migration exercises.
What you can do after
Operate Jest through Angular configuration, run specs with ng test, and migrate existing Karma-based tests while diagnosing setup failures.

Read how Modern Angular explains Jest →

Contract Testing in Action

Jest is a JavaScript testing framework that provides test structure, assertions, and test execution utilities.

How it is used
Uses Jest to structure and execute consumer-driven contract tests for web APIs and event-message consumers.
How deep it goes
Explains describe, test, asynchronous execution, and assertions through a complete Pact example, without detailing Jest internals.
Examples
Uses nested Movies API scenarios, a GET /movies interaction, a movie response body, generated pact JSON, and an npm test script.
What you can do after
Apply it via Jest to write, run, and assert consumer contract tests against Pact mock providers.

Read how Contract Testing in Action explains Jest →

Essential TypeScript 5, Third Edition

Jest is a JavaScript testing framework that provides APIs for defining tests, making assertions, and reporting results.

How it is used
Supports unit testing for TypeScript application functions and reports whether their runtime behavior matches expectations.
How deep it goes
Explains installation, configuration, test construction, matchers, watch mode, failure output, and test-versus-code correction.
Examples
Uses a calc.test.ts test for sum(10, 20, 30), Jest matcher examples, watch-mode output, and an intentionally incorrect calculation.
What you can do after
Apply it via Jest, ts-jest, and watch mode to create, run, inspect, and repair TypeScript unit tests.

Read how Essential TypeScript 5, Third Edition explains Jest →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.