Overview of @jest/schemas
main@jest/schemas module is an experimental and currently incomplete package used to provide JSON schemas for Jest's configuration. It is intended to help validate configuration objects used within the Jest ecosystem.repository·main·Indexed 12 days ago
https://github.com/jestjs/jestA comprehensive JavaScript testing solution featuring fast interactive watch mode, snapshot testing, and support for build tools like Babel, webpack, Vite, and Parcel. Includes utilities such as create-jest for project initialization, babel-jest for compilation, and @jest/diff-sequences for comparing sequences.
@jest/schemas module is an experimental and currently incomplete package used to provide JSON schemas for Jest's configuration. It is intended to help validate configuration objects used within the Jest ecosystem.@jest/pattern is a helper library used by Jest to implement the logic for parsing and matching patterns. It provides the underlying mechanism for handling file patterns and matching logic used throughout the Jest ecosystem.jest-haste-map is a module used by Jest to create a fast lookup of files in a project. It is designed to efficiently locate and track file changes, which is particularly beneficial for large projects.
Key features include:
Jest is a JavaScript testing framework designed to be developer-ready and provide instant feedback. Key features include:
Jest 27 introduced several quality-of-life improvements:
transform configuration option now supports asynchronous functions, enabling efficient integration with tools like esbuild, Snowpack, and Vite.The @jest/expect package provides an extended version of the standard expect library by adding jest-snapshot matchers. It exports a jestExpect object that can be used as a standalone replacement for the default expect function in environments where Jest is not globally available or when you need snapshot testing capabilities in a standalone context.
import { jestExpect } from '@jest/expect';
// Use jestExpect just like you would use expect
jestExpect(value).toBe(expected);Jest 30 introduces several new capabilities and improvements to the core framework, focusing on performance, ESM support, and developer ergonomics. Key updates include:
using keyword: Support for using the ECMAScript using keyword with spies.expect.arrayOf: A new matcher for validating arrays.test.each placeholder %$: A new placeholder for parameterized tests.jest.advanceTimersToNextFrame(): A new utility for controlling timer progression.jest.unstable_unmockModule(): A new method for unmocking modules.The jest-community GitHub organization hosts high-quality Jest additions, tools, and plugins curated by Jest maintainers and collaborators. These projects are designed to extend Jest's capabilities and improve the testing experience.
Key community projects include:
expect package provides the core expect function used throughout Jest to perform assertions. It is the entry point for all matchers (e.g., toBe, toEqual) used to validate values in your tests. For a full list of available matchers and advanced usage, refer to the official Jest documentation.In Jest v23.0.0, the way mocks are serialized changed. Timestamps were replaced with invocationCallOrder to provide a more reliable way to track the sequence of calls.
Jest assigns a unique, index-based ID to each worker process via the JEST_WORKER_ID environment variable.
1.--runInBand CLI flag, all tests will share the same JEST_WORKER_ID of 1 because tests are executed sequentially in a single process.jest-watch was introduced to facilitate the development of custom watch plugins. This package provides the necessary primitives to hook into the Jest watch lifecycle.