jest-community / vscode-jest

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

[BUG] Jest extension TESTS RESULTS console output causes VS Code to steal focus #1117

Closed rcbevans closed 4 months ago

rcbevans commented 4 months ago

Describe the bug The Jest extension test output being written to the TEST RESULTS console causes VS Code to steal window focus.

To Reproduce Steps to reproduce the behavior:

  1. Open a workspace/project with jest tests
  2. Switch to another window

Expected behavior The tests should run in the background without stealing window focus back to VS Code

Actual behavior Every time console output is written to the TEST RESULTS console, the host VS Code window steals focus making doing anything else impossible.

I have had to disable the jest runners to prevent auto running of tests on change because it's so disruptive.

Environment (please complete the following information):

VS Code info: Version: 1.86.2 Commit: https://github.com/microsoft/vscode/commit/903b1e9d8990623e3d7da1df3d33db3e42d80eda Date: 2024-02-13T19:41:37.860Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Linux x64 6.6.10-76060610-generic

Prerequisite

Additional context I'm not sure if this is necessarily a Jest extension issue of a core VS Code issue as the problem was introduced after a recent VS Code update, so I also filed an issue there.

https://github.com/microsoft/vscode/issues/205766

connectdotz commented 4 months ago

Duplicate of #1111, please see the answer here