Closed JordanLongstaff closed 2 years ago
"jest.autoRun": "off"
works fine, but it's the previous setting that doesn't, which is disappointing because it means that I can't make Jest tests run when VS Code starts. Both autorun modes are referred to as auto-run-off
, and yet one of them is misleading because it is inaccurate.
Try false without quotes
Jeez, I feel so dumb. Thanks!
Environment
vscode-jest version
: 4.2.1node -v
: 14.17.5npm -v
oryarn --version
: 6.14.14 and 1.22.17, respectivelynpm ls jest
ornpm ls react-scripts
(if you haven’t ejected):jest@26.6.3
{ "watch": "false", "onStartup": ["all-tests"] }
Prerequisite
npm run test
ornode_modules/.bin/jest
)jest path/to/test/file.test.ts
(node_modules/.bin
is added to PATH)Steps to Reproduce
All I do is save a file, and then Jest suddenly runs all of the available tests (and does so multiple times, which really bogs down VS Code). This is in spite of the fact that I have explicitly disabled watch mode entirely, as indicated by the above setting.
Expected Behavior
The tests should not be running in response to a code file being saved.
Actual Behavior
They are.
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...