jest-community / vscode-jest

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

[FEATURE] Option to completely disable terminal #1143

Closed asportnoy closed 2 months ago

asportnoy commented 7 months ago

Is your feature request related to a problem? Please describe. The Jest terminal gets in the way for me and messes with my workflow

Describe the solution you'd like I'd like an option to completely disable the terminal from showing up and solely have results in the "test results" panel

Describe alternatives you've considered I disabled the auto focus which did help a bit, but still would prefer for it to not be there at all. I tried manually closing the terminal as well but it just reopens the next time I run a test.

Additional context N/A

connectdotz commented 6 months ago

This is the first time I've encountered such a request. Typically, disabling jest.outputConfig.revealWithFocus should prevent the terminal from popping up to interrupt your workflow. Rather than adding another option to disable the terminal, perhaps we could consider handling the terminal's close event to ensure it doesn't reopen once a user has explicitly closed it. 🤔

Let's keep this discussion open to gather more feedback from other users.

asportnoy commented 6 months ago

That seems like a pretty good option to me, makes sense that closing the terminal would keep it from re-opening.

connectdotz commented 3 months ago

ok, now we have a 2nd request... I took a closer look, and looks like we could already do this today by setting the outputConfig reveal option to "demand":

"jest.outputConfig": {
    "revealOn": "demand"
  },

Can you guys give this a try and let me know if it resolves your issue?

SpencerKaiser commented 3 months ago

Incredible... that's exactly what I was looking for!

How does one reveal the terminal "on demand" though?

connectdotz commented 3 months ago

How does one reveal the terminal "on demand" though?

Click on the Jest item in the status bar (at the bottom of the window) to open the terminal for the active workspace, corresponding to the active editor:

Screenshot 2024-08-12 at 9 47 50 PM
connectdotz commented 2 months ago

close this request as the solution is already available: here