-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest stuck - keeps spinning, no output #128
Comments
Hey, I experience the same error.
System
I would love to see the Jest integration working in my VSCode. :-) Thanks in advance UPDATE UPDATE 2 UPDATE 3 |
Have you tried running jest standalone without the plugin? This plugin doesn't talk directly to git in any way, all of that logic is handled directly by jest. |
I get this from Developer Tools shell.ts:419 [Orta.vscode-jest] Cannot read property 'testRegex' of undefined: TypeError: Cannot read property 'testRegex' of undefined
at JestExt.wouldJestRunURI (/Users/nicolau/.vscode/extensions/Orta.vscode-jest-2.3.0/out/src/JestExt.js:253:64)
at JestExt.canUpdateDecorators (/Users/nicolau/.vscode/extensions/Orta.vscode-jest-2.3.0/out/src/JestExt.js:249:34)
at JestExt.triggerUpdateDecorations (/Users/nicolau/.vscode/extensions/Orta.vscode-jest-2.3.0/out/src/JestExt.js:131:19)
at vscode.window.onDidChangeActiveTextEditor.editor (/Users/nicolau/.vscode/extensions/Orta.vscode-jest-2.3.0/out/src/fileChangeWatchers.js:9:21)
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:55287)
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:57078)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:393153
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:55287)
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:57078)
at e.$acceptDocumentsAndEditorsDelta (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:351598)
at t.e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:423958)
at e._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:280554)
at e._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:280244)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:279271
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:281190
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:56058
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:55287)
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:57078)
at Socket.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:102495)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20) |
This error points to a failure to load jest settings. Any chance you have a sample repo we can clone to try to reproduce? |
I experience a similar problem, here is the output of the Developer Tools Console:
This happens on startup, after that the Jest extension ist stuck with "testing changes". Jest extension version: jest.config.js:
|
Thanks for sharing your problem @dennisreimann. Looking through |
@dennisreimann, the fix has been published. |
Probably related to jestjs/jest#4419, try creating a git repo inside or waiting until the fix is released. At least this fixed it for me. |
I missed your reply, sorry @dennisreimann. Is the project set up in a git or hg repo? |
@seanpoulter unfortunately this isn't a public project.
Of course – is this something we can have a quick look at together in a screensharing session? Otherwise I will try to come up with a similar setup in a separate repo you can reproduce the problem with. |
I'd be happy to try and figure this out on a screenshare @dennisreimann! Here's where I'd suggest we start to figure out what's happened so far, and where it's stuck:
|
Ok, I checked whether or not I can come up with more debuggable output using the steps you provided. I guess this is related, the debugging console outputs this message a few seconds after I save a test file:
However, I don't get to the breakpoint I've set in the |
I found the culprit: We are using Webpack's resolve.alias feature. This leads to files that cannot be resolved by the vscode-jest extension, so the tests can't be run. The relevant webpack config part: module.exports = {
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src'),
}
}
} An import example: // with resolve.alias
import FormField from '@/vue/components/FormField'
// regular import
import FormField from '../../components/FormField' If this is something you would like to fix, you can leave the issue open and I'll try to provide a test project. Otherwise you can close this issue as this case might be to special to address. Thanks for your help! |
Wow, glad you found it @dennisreimann! I'm happy to keep the issue open and make sure we're properly handling the |
I'm not convinced that the module resolution is the root cause. This minimal repo worked OK. 😕 The only time it I got the "testing changes" spinner was before setting up a |
Environment
node -v
: v6.10.3npm -v
: 3.10.10npm ls react-scripts
(if you haven’t ejected):`-- (empty)
npm ERR! code 1
Operating system: Windows
Steps to Reproduce
No matter if start my project, or stop/start Jest - it keeps spinning and does nothing. One of five it suddenly works, then gets stuck again after a while.
There are some warnings in the developer console:
The text was updated successfully, but these errors were encountered: