vscode-jest
vscode-jest copied to clipboard
Failed test labeled incorrectly when tests are using the same name
Environment
-
node -v
: v15.13.0 -
npm -v
: 7.7.6 -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): ── [email protected] -
Operating system: MacOS
Prerequisite
- are you able to run jest test from command line? Test failed as expected.
- how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
) node_modules/.bin/jest --testPathPattern=xxx
Steps to Reproduce
When I have two tests with the same name, with the first one passing and the second one failing. I noticed the failure label is marked to the first test case.
Relevant Debug Info
Screenshot at here
Expected Behavior
The failure should be able to know what actual test is failing, not relying on test name.
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...
please try v4.0.0-alpha.5, which should address this issue, and let us know if it works for you.