Jest
Jest is a JavaScript testing framework for defining, running, and asserting automated tests.
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.
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.
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.
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.
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
- test automation frameworkkind of · A test automation framework is software infrastructure that provides conventions and facilities for defining, organizing, executing, and evaluating automated tests.
- test runnerkind of · A test runner is software that discovers or receives automated tests, executes them, and reports their results.
- Karmaalternative to · Karma is a JavaScript test runner that executes tests in browsers or browser-like environments and reports their results.
- testuses · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
- npxused by · npx is an npm command-line package runner that executes package-provided binaries from local dependencies or downloads packages when needed, without requiring global installation.
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.




