This is a Heft plugin for running Jest.
This package includes a heft-jest CLI wrapper that enables integration with the
VSCode Jest extension. The wrapper translates
Jest CLI parameters to Heft CLI parameters, allowing the extension to work with Heft's test
runner.
To use the VSCode Jest extension with Heft, configure the extension's jest.jestCommandLine
setting in your VSCode workspace settings (.vscode/settings.json):
{
"jest.jestCommandLine": "npx heft-jest"
}Or, if you have @rushstack/heft-jest-plugin installed globally or linked:
{
"jest.jestCommandLine": "heft-jest"
}The heft-jest CLI accepts Jest CLI parameters commonly sent by the VSCode Jest extension and
translates them to equivalent Heft parameters. For example:
| Jest Parameter | Heft Parameter |
|---|---|
--testPathPattern |
--test-path-pattern |
--testNamePattern or -t |
--test-name-pattern |
--updateSnapshot or -u |
--update-snapshots |
--maxWorkers |
--max-workers |
--testTimeout |
--test-timeout-ms |
--no-coverage |
--disable-code-coverage |
--detectOpenHandles |
--detect-open-handles |
--silent |
--silent |
--logHeapUsage |
--log-heap-usage |
--watchAll / --watch |
Uses heft test-watch instead of heft test |
Parameters specific to the VSCode Jest extension (like --json, --outputFile, --reporters)
are automatically filtered out.
- CHANGELOG.md - Find out what's new in the latest version
- @rushstack/heft - Heft is a config-driven toolchain that invokes popular tools such as TypeScript, ESLint, Jest, Webpack, and API Extractor.
Heft is part of the Rush Stack family of projects.