vscode-jest: "Starting watch mode" never finishes & test indicators' state never changes.
Hello,
I’m not sure if I’m the only one experiencing this, but this extension never finishes the “Starting watch mode” phase. Although, all of tests run, but the pass/fail indicator next to the test in the editor never changes from an unfilled green circle to the failed or pass state.
Other than that it’s been working very well.
Thanks for a great extension, it’s been very helpful, I appreciate the time and work that you’ve put into it.
Kindest regards.
Environment
node -v
: v8.11.1npm -v
: 6.0.0npm ls react-scripts
(if you haven’t ejected):
@goldberg/nodejs.ts.lib.bare-base@1.0.0 /home/moored/workspaces/au.net.dmdigital.gitlab/goldberg/libraries/bare-base
└── (empty)
- Operating system:
$ cat /proc/version
Linux version 4.10.0-38-generic (buildd@lgw01-amd64-059) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017
$ lsb_release -a
Distributor ID: LinuxMint
Description: Linux Mint 18.3 Sylvia
Release: 18.3
Codename: sylvia
$ cat /etc/debian_version
stretch/sid
Steps to Reproduce
- Clone repo: https://github.com/zeroEvidence/bare-base
$ npm install
- Open workspace with vscode v1.22.2, or 1.22.1, or 1.21.1
- Disable all extensions except for vscode-jest
Expected Behavior
vscode-jest extension should finish initising watch mode and the test indicators should change state
Actual Behavior
vscode-jest extension “starting watch mode” runs forever.
VSCode developer console log
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 55
- Comments: 28 (5 by maintainers)
Commits related to this issue
- updated jestProcess call to use watchAll instad of watch This is an attempt to fix issue https://github.com/jest-community/vscode-jest/issues/316 — committed to abner/vscode-jest by abner 6 years ago
- Downgrade jest and ts-jest to workaround vscode bug https://github.com/jest-community/vscode-jest/issues/316 — committed to nozzlegear/tsbs by nozzlegear 6 years ago
- updated jestProcess call to use watchAll instad of watch This is an attempt to fix issue https://github.com/jest-community/vscode-jest/issues/316 — committed to legend1202/vscode-jest by abner 6 years ago
I digged into this a little bit tonight, looks like the hanging watch mode is caused by (facebook/jest#4858), which caused the test results output messaging moved from stdout to stderr for the Runner. Sine vscode-jest (jest-editor-support to be precise) relies on this message on stedout to kick off test result parsing, it therefore hangs indefinitely…
I will submit PRs (both jest-editor-support and vscode-jest) this weekend to address this root cause.
I’m experiencing this issue with “jest”: “^23.1.0”
I’m experiencing this issue with Jest 23.0.1. If I downgrade to 22.x it works correctly again.
Currently using 2.8.0 of VSCode Jest. Same issue @wmertens describes — status never changes from “Starting watch mode” and status dots and inline errors etc never appear. But Jest channel output appears to be working correctly in watch mode.
vscode-jest 2.9.0 has shipped with jest 23.x support, which should address this issue. Feel free to reopen if otherwise.
I’ve figured out that this issue happens if jest is upgraded to one of their early v23 releases. Downgrading to the latest v22 resolves this issue. Albeit, I could’ve sworn that vscode-jest was working with v23.0.0-alpha.0 the other day. 😕 This issue may be indicative that there might be issues with vscode-jest v2.7.0 and jest v23.
Happening on Jest 24.1.0, what version should I donwngrade to ? Thanks!
@connectdotz, hey! I’ve just installed 2.9.2 version and this issue is still re-produced. Here’s my package.json:
Please let me know if you need any other info or you want me to create another GitHub issue for that.
Thanks!
Hit the issue with v 2.9.2 and jest 24.8.0 on windows
Should this config be responsible?:
“jest.pathToJest”: “npm run test --”
Using it as a workaround for other issue: https://github.com/jest-community/vscode-jest/issues/426
@mikeesouth The fix I am using is
npm i -D jest@22 babel-jest@22
FYI I get this with “initial full test”. Reverting to 22.4.4 stopped the error.
Not yet @ellipticaldoor. Does anyone have time to investigate why this is only an issue on Jest v23? If you have any questions getting the extension set up to debug send me a message.