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

[BUG] Editor continues to show test failure icon after test run is passing #1145

Closed
mysticflute opened this issue May 2, 2024 · 1 comment · Fixed by #1146
Closed

[BUG] Editor continues to show test failure icon after test run is passing #1145

mysticflute opened this issue May 2, 2024 · 1 comment · Fixed by #1146
Labels

Comments

@mysticflute
Copy link

Describe the bug
After a recent update to VS Code I noticed an issue with the editor icons/buttons not updating when a test goes from failing to passing in watch mode. It continues to show the test as failing, even though the test is passing. The failure line of code in the test that is underlined in red does goes away, but the icon buttons for the test name continue to show the red x. If I manually click the button to run the test again it correctly shows the green check icon for the passing test.

I've tried reinstalling the plugin but it didn't fix it.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the plugin for watch mode.
  2. Have a passing test for some code under test.
  3. Change the code being tested such that the test starts failing. The editor shows a red failure icon for the test.
  4. Change the code being tested back so that the test passes. The editor continues to show the red failure icon even though the test is passing.

Expected behavior
The icon button changes back to show the test as passing, without having to manually run the test.

Screenshots
Screenshot 2024-05-02 at 12 13 22

Environment (please complete the following information):

  • vscode-jest version: v6.2.4
  • node -v: v20.12.1
  • npm -v or yarn --version: npm 10.5.0
  • jest or react-scripts (if you haven’t ejected) version: jest 29.7.0
  • your vscode-jest settings:
    • jest.jestCommandLine?
    • jest.runMode? watch
    • jest.outputConfig? none
    • anything else that you think might be relevant? VS Code Version: 1.88.1 (Universal)
  • Operating system: MacOS 14.4.1 (23E224)

Prerequisite

  • are you able to run jest from the command line? yes
  • where do you run jest CLI from? root
  • how do you run your tests from the command line? nom run test

Additional context
Add any other context about the problem here.


The fastest (and the most fun) way to resolve the issue is to submit a pull request yourself. If you are interested, please check out the contribution guide, we look forward to seeing your PR...

@connectdotz connectdotz added the bug label May 3, 2024
@connectdotz
Copy link
Collaborator

Yes, I can reproduce this bug. Thanks for bringing this to our attention. I will patch it soon.

connectdotz added a commit to connectdotz/vscode-jest that referenced this issue May 3, 2024
connectdotz added a commit that referenced this issue May 3, 2024
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