jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.84k stars 294 forks source link

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

Closed mysticflute closed 6 months ago

mysticflute commented 6 months ago

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):

Prerequisite

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 commented 6 months ago

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