Closed FrankVisuals closed 1 year ago
Also experiencing this at the moment. Is there any workaround that anyone can think of (other than refactoring the tests to one-per-file)?
Yes, this is a bug. I will patch it soon. Thanks!
Note this only happens the first time if the file hasn't been run. Once the file (tests) have been executed, it will not happen again. So @cpwood I don't think you need to refactor your tests.
Thanks for the update!
This is still happening, worse yet, it is running tests that are meant to be skipped. If you want to try and reproduce I'm doing this exercise here (but it happens in general) https://exercism.org/tracks/javascript/exercises/dominoes
I click on one test to debug it, and instead it tries to run other tests in the file too, worse even, it runs tests that are marked with an "x" meaning they should be skipped. And it is only telling me this because it is encountering a type error.
Is this intended?
Environment
vscode-jest version
:5.2.3
node -v
:16.19.0
npm -v
oryarn --version
: npm8.19.3
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected):jest@29.5.0
ts-jest@29.1.0
MacOS 13.2.1 (22D68)
Prerequisite
npx jest
Steps to Reproduce
https://github.com/FrankVisuals/vscode-jest-issue
Freshly written Test:
Clicking only the test in line 4
But still executes both tests
Afterwards, when clicking only one test, it works.
Relevant Debug Info
n/a
Expected Behavior
Also on first click it should execute only one test.
Actual Behavior
Executes all tests on first click of individual execution.
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...