vscode-jest
vscode-jest copied to clipboard
Show tests that fail to run as failed
Environment
-
vscode-jest version
: 5.2.3 -
node -v
: v18.14.0 -
npm -v
oryarn --version
: npm 9.3.1 -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): ├── [email protected] └─┬ [email protected] └── [email protected] deduped -
your vscode-jest settings if customized:
- jest.jestCommandLine?
- jest.autoRun? {}
- anything else that you think might be relevant? [fill]
-
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
ornode_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...