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

Show tests that fail to run as failed

Open ocie opened this issue 1 year ago • 0 comments

Environment

  1. vscode-jest version: 5.2.3

  2. node -v: v18.14.0

  3. npm -v or yarn --version: npm 9.3.1

  4. npm ls jest or npm ls react-scripts (if you haven’t ejected): ├── [email protected] └─┬ [email protected] └── [email protected] deduped

  5. your vscode-jest settings if customized:

    • jest.jestCommandLine?
    • jest.autoRun? {}
    • anything else that you think might be relevant? [fill]
  6. Operating system: MacOS sonoma 14.1.2

Prerequisite

  • are you able to run jest test from the command line? yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) [fill]

Steps to Reproduce

https://github.com/ocie/jesttest

run unit test from vs code edit work.ts to make the field "field" private rerun the unit test

Expected Behavior

test should be marked as failed in the source code view because it failed to run.

Actual Behavior

test is marked as passing.

In this example, it is easy to see in the test explorer that something failed in this file, and the use of "field" is underlined in red because the field is now private. In a larger test suite, these clues are often not visible because they are on another page. Showing the test as failed would let the developer know that something is wrong.


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...

ocie avatar Dec 06 '23 01:12 ocie