-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Disable timeouts when running under the debug #865
Comments
+1 |
hmm yeah I'm down, bit of an edge-case thing but hey |
This person also cites timeout-in-debug as an issue: http://ronderksen.nl/2012/05/03/debugging-mocha-tests-in-webstorm/ |
this just bit me as well |
…tion-is-set closes #865: Disable timeouts when running under the debug
Worth noting, for anyone digging into this - the final decision was made to use
as the option name vs. |
don't know about you guys, but I can debug all my code in less than 2 seconds :) |
can someone explain here what --no-timeouts does and what it doesn't do? I have:
it still seems to show errors/warnings with the no-timeouts flag on, but perhaps it doesn't fail the tests before they all are attempted? |
@ORESoftware I think you need to put the argument on the other side of the _mocha call
|
These solutions are unsatisfactory. We absolutely positively do need an option to automatically disable timeouts if mocha is being run under a debugger. |
This is cute if you're thinking about run time and optimization - of course your functions should run quickly. However, if you are debugging, and for example, you are traversing some giant JSON and running find/filter functions on the data sets to poke around in things, then you may timeout. Now, of course, if it is like a response JSON, you can just copy paste into a JSON editor. But, if you are doing something where you are looking at 1 object, deeply, and based on that information, moving into another object somewhere else, deeply again, and following a complicated process like this, then even if your function runs in well under 2s, your debugging process can be quite long. AKA point is moot but nice humblebrag :) |
Sometime's I'll be stepping through Node code in the debugger, which obviously draws out test execution time considerably, but Mocha still times out the test after 2 seconds. I've been getting around the problem by using .timeout(0), but it would be sweet if Mocha could detect that the code was running under the debugger (by checking the global.v8debug flag, at least in node) and disable timeouts in that case.
The text was updated successfully, but these errors were encountered: