vitest icon indicating copy to clipboard operation
vitest copied to clipboard

consider --timeout in CLI options for use with VSCode debugger

Open panick-carousel opened this issue 2 years ago • 2 comments

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

panick-carousel avatar Aug 02 '22 04:08 panick-carousel

Sorry, I don't understand what you want. Do you need timeout after tests are run, or before Vitest runs tests?

sheremet-va avatar Aug 02 '22 05:08 sheremet-va

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.

panick-carousel avatar Aug 02 '22 05:08 panick-carousel

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?

larswww avatar Nov 23 '22 15:11 larswww

+1 facing this issue as well

mekapotulas avatar Mar 16 '23 06:03 mekapotulas