Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show tests that fail to run as failed #1098

Open
ocie opened this issue Dec 6, 2023 · 0 comments
Open

Show tests that fail to run as failed #1098

ocie opened this issue Dec 6, 2023 · 0 comments
Labels

Comments

@ocie
Copy link

ocie commented Dec 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants