vscode-jest icon indicating copy to clipboard operation
vscode-jest copied to clipboard

Failed test labeled incorrectly when tests are using the same name

Open RonWang opened this issue 3 years ago • 1 comments

Environment

  1. node -v: v15.13.0

  2. npm -v: 7.7.6

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): ── [email protected]

  4. 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 or node_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...

RonWang avatar Apr 19 '21 19:04 RonWang

please try v4.0.0-alpha.5, which should address this issue, and let us know if it works for you.

connectdotz avatar Apr 20 '21 15:04 connectdotz