Jest runner in the background after exit
See original GitHub issueEnvironment
-
node -v
:v13.7.0
-
npm -v
:6.13.6
-
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected):jest@25.1.0
/react-scripts@3.3.0 (see below)
-
your vscode-jest settings if customized:
- jest.pathToJest?
Not customized
- jest.pathToConfig?
Not customized
- anything else that you think might be relevant?
Multi-root project, with Jest 25 on its own on back-end and react-scripts on the front-end
- jest.pathToJest?
-
Operating system:
Ubuntu 18.04
Prerequisite
- are you able to run jest test from command line?
Yes
- how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
)npm run test
Steps to Reproduce
Not sure how to create a relevant repository. Would appreciate guidance on the diagnostic path. I’ve tried enabling debug, nothing suspicious emerges.
Expected Behavior
Jest runs correctly in the extension. Icons are fine, test results are reported correctly. Upon termination of VS Code, no Jest processes are left behind.
Actual Behavior
Jest runs correctly in the extension. Icons are fine, test results are reported correctly.
Upon termination of VS Code, I am left with a number of ghost processes. See below for the output of ps aux:
paolo 14981 22.6 0.7 981876 128424 tty2 Sl+ 09:55 0:06 node /home/paolo/react/CongressGuru/congress-guru/backend/lambdas/node_modules/.bin/jest --testLocationInResults --json --useStderr --outputFile /tmp/jest_runner_lambda.json --watch --coverage --no-color --reporters default --reporters /home/paolo/.vscode/extensions/orta.vscode-jest-3.1.1/out/reporter.js
paolo 15418 0.2 0.1 587628 24740 tty2 Sl+ 09:55 0:00 node /home/paolo/react/CongressGuru/congress-guru/frontend/node_modules/.bin/react-scripts test --testLocationInResults --json --useStderr --outputFile /tmp/jest_runner_front_end.json --watch --coverage --no-color --reporters default --reporters /home/paolo/.vscode/extensions/orta.vscode-jest-3.1.1/out/reporter.js
paolo 15425 8.1 0.4 954260 68880 tty2 Sl+ 09:55 0:01 node /home/paolo/react/CongressGuru/congress-guru/frontend/node_modules/react-scripts/scripts/test.js --testLocationInResults --json --useStderr --outputFile /tmp/jest_runner_front_end.json --watch --coverage --no-color --reporters default --reporters /home/paolo/.vscode/extensions/orta.vscode-jest-3.1.1/out/reporter.js
The only solution I have found is running a pkill node
.
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…
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:11 (1 by maintainers)
Top GitHub Comments
thanks for everybody’s data points, I was able to reproduce this and observed these 2 types of behaviors:
@jeantil I could not reproduce your observation with coverage toggle, but I suspect it probably falls into one of the categories mentioned above…
Apology if this has happened to your project, I am afraid you will have to manually kill these orphan processes for now (such as
pkill -f jest
orpkill -f jest_runner
). I will take a look to see how we can address this ASAP…hi, we have a new release candidate with the fix: v3.2.0. Would appreciate more testing before release, please feel free to give it a try and let us know if it worked, or not…
(to try the new release candidate, just to install the .vsix file (vscode-jest-3.2.0.vsix) in your vscode: https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix)