-
Notifications
You must be signed in to change notification settings - Fork 295
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
How to disable annoyingly terminal pop up on launch #973
Comments
I have set |
I think defer output till the actual run is a good idea! |
Here is the change I am currently thinking:
The trigger events to create and bring terminal to the foreground (apply to all jest.revealOutput setting):
Note, the silent mode could mask issues such as an unintended jest process running in the background. (see some explanation about background/foreground terminal here) |
They had a setting to disable it, but removed in new version. |
Ok, I have a prototype fix now (what could be a better use of Christmas eve 🤣 ). Giving we have many enthusiastic users here, I hope you guys can help us test it:
Play around with it, and let me know how it works. Thanks. |
@connectdotz I tried the new build but the terminal is still popping up: The jest.config above is an empty file, but the terminal also pops up when I tried it in a client's project with valid jest config. |
@rangedsp the terminal will always be shown if there is a fatal error, such as when jest can not be started like the one above. If there is no fatal error, the terminal should not be shown, assuming your terminal is not already opened. Let me know if you still have a problem. |
@connectdotz I can understand why errors prompt the terminal to show up, though in this case I am setting it to autoRun 'off' and revealOutput to be 'silence'. I.e. the intent is for jest to not do anything in the background. May I suggest another level of 'revealOutput' that also prevents fatal errors from showing up? |
I agree, there should be an option to completely disable jest terminal prompts |
Please help me understand why you don't want to know the fatal error if your goal is to run jest tests...
When the extension starts up, before it can run jest, it will examine your environment, checking jest commands and counting test files as part of the extension setting up process. It's during this stage that it discovers the error you saw. Hiding the terminal does not stop the setup process; it only masks what really happened... If your environment is not ready for jest yet, maybe what you are asking is to "disable" the extension, not just the terminal? What did I miss? |
I have many workspaces, some with jest tests, some mainly C#, and quite a few others. That's why I turned off autoRun: I want to not know the extension jest even exists until I go into the testing tab and hit run. At that point, if a fatal error occurs it absolutely should be shown. Yes, I do disable the extension every once in a while, but having to toggle it on/off and having to reload the window is a pain. This seems to be in-line with what's in the OP's 'expected behavior':
Perhaps this is out of scope for this thread, but I'm curious to know why jest setup needs to be run on startup, as opposed to running it when you click on the testing tab? I played around with a couple of extensions I use a lot, (Docker, SQLTools, and Azure), and they only start enumerating resources when I click open their respective tabs. |
When I am rebasing my branch or making search-and-replace changes or other refactorizations, it's not that uncommon that the code is in a temporary state where some of the tests don't pass. I know why this happens. I use the Jest field in the status bar to confirm this, and confirm that everything is once again okay. So for me it's annoying that the terminal window opens up. I would like to be able to tell Jest to never open up the terminal automatically. I will do so with the item in the status bar, when I need it. |
thanks for the feedback!
This pointing to the activation problem. The extension should not be activated for C# or other non-js/ts related projects. In 5.0 we switched to deep activation, which seems to bring in some unexpected mixed language dependency issues that I will look into next. I think once we resolve it, many of the apparent terminal issues would go away.
@janaagaard75 Ok, based on all these feedbacks, I will make the following changes:
|
ok, submitted the update, here is a new vsix, feel free to give it a try (note the setting name and value change, see above) |
Hi, the fix |
I've tested the pre-release version and it works flawlessly. Thank you very much @connectdotz! |
oh Lord.. how to stop it from opening terminal popup on launch?
I expect to see it only popup on my manual run, but it opens the terminal on launch. |
@benevbright change jest.autoRevealOutput to off
|
In new version of Code Insiders there is another, more general setting setting (in "testing.openTesting": "neverOpen" |
In case you are here because of the February 2024 update to VS Code, see this newer issue: The current resolution is to apply the following configuration to your preferences, as mentioned above and by connectdotz: "testing.openTesting": "neverOpen" |
Environment
vscode-jest version
: v5.1.0node -v
: v14.18.2npm -v
oryarn --version
: 6.14.15npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): └── jest@27.5.1Prerequisite
npm run test
ornode_modules/.bin/jest
) npm run testSteps to Reproduce
Relevant Debug Info
This is so annoying, when opening a project, it automatically start a new terminal logging the auto config. I don't want this behavior, how to disable terminal automatically popping up?
Expected Behavior
Terminal not popping up on every launch, instead only launch when tests runner are clicked.
Actual Behavior
Terminal annoyingly pop up on every launch.
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...
The text was updated successfully, but these errors were encountered: