vitest
vitest copied to clipboard
consider --timeout in CLI options for use with VSCode debugger
Clear and concise description of the problem
When using the debugger in vscode, our tests keep timing out, but we don't want to have to set the timeout in the config file because this works great for our CI setup.
Suggested solution
Ideally at invocation time (ie: from the launcher) we could set a timeout so that when we hit a breakpoint, the delay will not cause the test to fail and therefore not proceed any further down the codepath we are trying to troubleshoot.
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sorry, I don't understand what you want. Do you need timeout after tests are run, or before Vitest runs tests?
I am requesting to be able to override the config file timeout setting by passing a cli option. Specifically this setting: https://vitest.dev/config/#testtimeout
This means vscode debugger becomes usable easily.
Having the same issue. I am debugging the code and due to time spent paused on a breakpoint, I hit the 5000ms default limit. I don't want to increase the timeout because when I run the tests without the debugger, then I want it to be limited.
Perhaps an interim solution could be to set timeout to infinite, based on process.env?
+1 facing this issue as well