Debug codelenes disappear after window loads
See original GitHub issueI’m using vscode-jest in conjunction with Wallaby.js for my TypeScript application.
I used to see the Debug CodeLens above it()
tests, but they no longer stay – if I restart or do a reload-window, the Debug
decoration will appear momentarily, but then disappear. (This is also true if don’t start Wallaby.)
If I run vscode-jest in debug mode, I can see that it seems to be throwing a parse error, but it doesn’t tell me what the offending file is. Using Jest: Start Runner
or using Wallaby I’m able to run jest w/o any issues and can see the test output, so this seems to be specific to invocation for codelens support?
node -v
: v10.6.0
npm -v
: 6.1.0
npm ls jest
– jest@20.0.1
Operating system
: Win7
thanks
=============
ERR Unexpected token (1:16): SyntaxError: Unexpected token (1:16) at Parser.pp$5.raise (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:4454:13) at Parser.pp.unexpected (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:1761:8) at Parser.pp.expectContextual (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:1723:39) at Parser.pp$1.parseImport (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:2869:10) at Parser.pp$1.parseStatement (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:1884:49) at Parser.parseStatement (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:5910:22) at Parser.pp$1.parseBlockBody (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:2268:21) at Parser.pp$1.parseTopLevel (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:1778:8) at Parser.parse (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:1673:17) at parse (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\babylon\lib\index.js:7305:37) at Snapshot.exports.getASTfor.file [as _parser] (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\jest-editor-support\build\parsers\babylon_parser.js:29:50) at Snapshot.getMetadata (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\node_modules\jest-editor-support\build\Snapshot.js:108:27) at SnapshotCodeLensProvider.provideCodeLenses (C:\Users\me.vscode\extensions\orta.vscode-jest-2.9.0\out\src\SnapshotCodeLens\SnapshotCodeLensProvider.js:23:26) at c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:733:575 at c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:110:323 at new n.Class.derive._oncancel (c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:84:776) at Object.t.asWinJsPromise (c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:110:286) at e.provideCodeLenses (c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:733:529) at c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:748:337 at e._withAdapter (c:\Users\me\AppData\Local\Programs\Microsoft VS …
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
what is the state of the tests you expect to see the debug codeLense? What are your codeLense related settings?
The default settings for codeLense are:
which means it will only show debug codeLense for the tests are either
unknown
orfail
. Once the tests are run and passed, the codeLense will disappear. If you want the codeLense to appear for tests that passed, you can customize:possible tests status are:
@connectdotz I get a similar error to @TheSimpleZ. In my case, this is because a few of my tests use the nullish coalescing operator. If I remove these, the Debug/Run codelens links start appearing again.
It still fails with v4.0.0-alpha.4, but at least the Debug codelens appears there.