jest-community / vscode-jest

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

[BUG] "testing.openTesting": "openOnTestFailure" opens the Test Results viewlet every test suite run, instead of only on failures #1118

Closed GeorgeWL closed 7 months ago

GeorgeWL commented 7 months ago

Describe the bug I tried setting "testing.openTesting": "openOnTestFailure" and the Test Results viewlet still opens every time, instead of only on failures

To Reproduce Steps to reproduce the behavior:

  1. Go to VS code settings
  2. Set "testing.openTesting": "openOnTestFailure"
  3. Trigger tests on a test suite that is all successful years
  4. The test results viewlet displays when it shouldn't do

Note: A sample repo will help us identify the bug much faster. 🙏

Expected behavior A clear and concise description of what you expected to happen. Viewlet only opens on failures, if all are successful, no Test Results viewlet is shown

Screenshots If applicable, add screenshots to help explain your problem.

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

GeorgeWL commented 7 months ago

https://github.com/jest-community/vscode-jest/issues/1111#issuecomment-1954422007

GeorgeWL commented 7 months ago

1119 seems to have mostly fixed it, my only curiosity, is there a way to have it auto-close when tests begin succeeding again, or is that not something the vscode API gives access to?

connectdotz commented 7 months ago

is there a way to have it auto-close when tests begin succeeding again

Yes, there is a command to close the panel, but neither vscode nor this extension implemented the auto "closing" logic.