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

Closed
ocie opened this issue Dec 6, 2023 · 1 comment · Fixed by #1165
Closed

Show tests that fail to run as failed #1098

ocie opened this issue Dec 6, 2023 · 1 comment · Fixed by #1165
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...

@connectdotz
Copy link
Collaborator

Hey everyone,

The fix is out! Check out the pre-release v6.3.0-next and let us know if you run into any issues.

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

Successfully merging a pull request may close this issue.

2 participants