Skip to content

test-runners/jest

This module provides functions for running tests using the Jest framework.

Interface Description
TestCoverageOptions Options for running tests with coverage.
TestOptions Options for running tests.
Function Description
hasJestConfig Says whether the project configures jest.
test Runs the test suite.
testCoverage Runs the test suite with coverage.
testWatch Runs the test suite in watch mode, re-running the tests the changed files affect. Jest needs a git or Mercurial repository for that.
Type Description
TestWatchOptions Options for running tests in watch mode.
Variable Description
EXPERIMENTAL_VM_MODULES_FLAG The Node flag jest’s ESM loader needs: it is built on vm.SyntheticModule, which Node only exposes under it. Without it every ESM suite fails to load with Must use import to load ES Module.
JEST_CONFIG_FILE_NAMES Every file jest reads its configuration from, besides the jest key of package.json.