Run Jest unit tests

Properties can be configured in workspace.json when defining the executor, or when invoking it. Read more about how to use executors and the CLI here:



Alias(es): b

Type: number | boolean

Exit the test suite immediately after n number of failing tests. (


Type: boolean

Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (


Type: boolean

Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. Note: clearing the cache will reduce performance.


Alias(es): coverage

Type: boolean

Indicates that test coverage information should be collected and reported in the output. (


Alias(es): colors

Type: boolean

Forces test results output color highlighting (even if stdout is not a TTY). Set to false if you would like to have no colors. (


Type: boolean

Forces test results output highlighting even if stdout is not a TTY. (


Type: string

The path to a Jest config file specifying how to find and execute tests. If no rootDir is set in the config, the directory containing the config file is assumed to be the rootDir for the project. This can also be a JSON-encoded value which Jest will use as configuration


Type: string

The directory where Jest should output its coverage files.


Type: array

A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter


Type: boolean

Attempt to collect and print open handles preventing Jest from exiting cleanly (


Type: string

Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (


Type: string

The path of the Jest configuration. (


Type: boolean

Prints the test results in JSON. This mode will send all other test output and user messages to stderr. (


Alias(es): w

Type: number | string

Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (


Alias(es): o

Type: boolean

Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a git or hg repository at the moment. (


Type: string

Write test results to a file when the --json option is also specified. (


Type: boolean

Will not fail if no tests are found (for example while using --testPathPattern.) (


Type: array

Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: jest --reporters="default" --reporters="jest-junit" (


Alias(es): i

Type: boolean

Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (


Type: string

[Deprecated] The name of a setup file used by Jest. (use Jest config file


Type: boolean

Print your Jest config and then exits. (


Type: boolean

Prevent tests from printing messages through the console. (


Type: string

The name of the file to test.


Type: boolean

Adds a location field to test results. Used to report location of a test in a reporter. { "column": 4, "line": 5 } (


Alias(es): t

Type: string

Run only tests with a name that matches the regex pattern. (


Type: array

An array of regexp pattern strings that is matched against all tests paths before executing the test. (


Type: string

Node module that implements a custom results processor. (


Type: string

[Deprecated] The name of the Typescript configuration file. Set the tsconfig option in the jest config file.


Alias(es): u

Type: boolean

Use this flag to re-record snapshots. Can be used together with a test suite pattern or with --testNamePattern to re-record snapshot for test matching the pattern. (


Type: boolean

Divert all output to stderr.


Type: boolean

Display individual test results with the test suite hierarchy. (


Type: boolean

Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the --watchAll option. (


Type: boolean

Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the --watch option. (