I want to run the Jest tests in band, because otherwise they will cause errors.
But I have no clue how to solve that problem. It works everything fine when I run the tests with the mand line.
I want to run the Jest tests in band, because otherwise they will cause errors.
But I have no clue how to solve that problem. It works everything fine when I run the tests with the mand line.
Share Improve this question edited Mar 12, 2020 at 20:37 skyboyer 23.8k7 gold badges62 silver badges71 bronze badges asked Mar 8, 2020 at 21:24 Michael MaroltMichael Marolt 612 silver badges8 bronze badges3 Answers
Reset to default 5In VSCode settings, change the Jest: Path to Jest
to the mand line you're running.
For example:
npm test -- --runInBand
In new version of vscode jest.pathToJest
is deprecated, instead you should set jest.jestCommandLine
.
You can either use the settings panel to set the value for the jestCommandLine
. like this:
Or you can manually update the settings.json
like this:
"jest.jestCommandLine": "\"./node_modules/.bin/jest\" --runInBand"
Another simple solution is
"jest.jestCommandLine": "npx jest"