Configure options below — the preview updates in real time.
Configure how Jest discovers and matches test files.
The glob patterns Jest uses to detect test files.
The pattern Jest uses to detect test files (mutually exclusive with testMatch).
An array of regexp pattern strings matched against all test paths before executing the test.
The root directory that Jest should scan for tests and modules within.
A list of paths to directories that Jest should use to search for files in.
The test environment that will be used for testing.
Test environment options that will be passed to the testEnvironment module (e.g. config for jsdom).
A label printed alongside a test while it is running (useful for monorepos).
Configure how Jest resolves modules, aliases, and file extensions.
An array of file extensions your modules use.
An array of directory names to be searched recursively up from the requiring module's location.
A map from regular expressions to module names to stub out resources (like CSS/images) or map aliases.
An array of absolute paths to additional locations to search when resolving modules.
An array of regexp pattern strings matched against all module paths before being considered visible to the loader.
Path to a custom module resolver instead of the default Node resolution.
Configure how Jest transforms source files before running tests.
A map from regular expressions to paths to transformers (e.g. babel-jest, ts-jest).
An array of regexp pattern strings matched against all source file paths; matched files skip transformation.
An array of file extensions that Jest will treat as ESM (ECMAScript Modules).
A preset that is used as a base for Jest's configuration (e.g. ts-jest, react-native).
Configure code coverage collection, providers, and reporting.
An array of glob patterns indicating a set of files for which coverage should be collected.
The directory where Jest should output its coverage files.
Indicates which provider should be used to instrument code for coverage.
A list of reporter names that Jest uses when writing coverage reports.
An array of regexp pattern strings matched against all file paths; matched files skip coverage.
Used to configure minimum threshold enforcement for coverage results (e.g. global branches, functions, lines, statements).
Allows you to collect coverage from specific test files that are normally ignored.
Configure setup and teardown files that run before/after tests.
A list of paths to modules that run some code to configure or set up the testing environment before Jest is injected.
A list of paths to modules that run setup code after the Jest environment has been mounted.
A custom module that exports an async function triggered once before all test suites.
A custom module that exports an async function triggered once after all test suites.
Configure automatic mocking, mock reset behavior, and module isolation.
An array of regexp pattern strings that matched modules will not be automatically mocked.
Configures Jest's fake timers (e.g. enableGlobally, advanceTimers, doNotFake, now, timerLimit, legacyFakeTimers).
Variables injected directly into the vm context to speed up global references.
Configure test execution behavior, timeouts, workers, and bail settings.
Default timeout of a test in milliseconds.
Stop running tests after N failures. Set to 0 to run all tests regardless of failures.
Maximum number of workers for running tests. Accepts a number or percentage string (e.g. 50%).
Limits the number of tests that are allowed to run simultaneously when using test.concurrent.
Specifies the memory limit for workers before they are recycled (e.g. 512MB).
The number of seconds after which a test is considered slow and reported as such.
The exit code Jest returns on failure.
Print a warning about open handles if Jest does not exit cleanly after this many milliseconds.
Configure test reporters, verbosity, and output behavior.
Custom reporters to format test output. Paths to custom reporters or built-in reporter names.
Specifies notification mode. Requires notify: true.
Configure snapshot serialization, formatting, and resolution.
The path to a module that can resolve test to snapshot paths.
A list of paths to snapshot serializer modules Jest should use.
Sets the path to the prettier node module used to update inline snapshots.
Configure file watching behavior and plugins.
An array of RegExp patterns matched against source file paths before re-running tests in watch mode.
Allows you to use custom watch plugins for Jest's watch mode.
Advanced settings for custom runners, sequencers, dependency extractors, and cache.
Allows you to use a custom runner instead of Jest's default.
Allows you to use a custom runtime module.
Allows the use of a custom test runner (e.g. jest-circus/runner or jest-jasmine2).
Allows you to use a custom sequencer to sort how tests are run.
Path to a custom results processor module.
Path to a custom dependency extractor module.
The directory where Jest should store its cached dependency information.
A set of global variables that need to be available in all test environments (like ts-jest configs).
Configures the behavior of jest-haste-map, Jest's internal file crawler/cache system.
Run Jest in multiple projects at the same time. Great for monorepos.
1export default {};