This module provides functions for running tests using the Jest framework.
| 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. |
| 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. |