firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Run/debug buttons placed at wrong position & associated with wrong test name #180

Closed LinqLover closed 3 years ago

LinqLover commented 3 years ago

Consider this file:

image

The buttons are placed at the wrong position in the test, and if I press the Run button, jest will be invoked like this in the console so no tests will be run at all:

node '/workspace/downstream-repository-mining/node_modules/.bin/jest' '/workspace/downstream-repository-mining/test/references\.test\.ts' -t 'getNpmDeps'

Apparently, the heuristic (?) that is used to find the jest cases does not cover my rather uncommon test file here ... :-)

firsttris commented 3 years ago

it should still work if you directly "right click" on the describe text and use the context-menu options. (with some kind of fallback solution)

LinqLover commented 3 years ago

Confirmed. So this is officially a low-level issue.

(Haha, I just noticed that I used the "Jest Test Explorer" for this before. :-) It does not have such a nice editor integration as this project, but the debugger integration is a bit better IMHO. For example, if I run an expect() assertion in the debugging console, with vscode-jest-runner, I see  artifacts in the output, whereas when using "Jest Test Explorer", jest appears to know that it is not printing to a TTY. Just a notice. :-))

firsttris commented 3 years ago

can you post a example screenshot of what you explained?

firsttris commented 3 years ago

check v0.4.43 if the behaviour has improved?

before there was a bug where the codelens options (run,debug) where placed at the wrong position. question: was this also related to your issue, and is fixed now?

regards tristan

firsttris commented 3 years ago

re-open if this issue still persists