You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which environment are you using? (e.g., browser, Node): browser
How are you running QUnit? (e.g., QUnit CLI, Grunt, Karma, manually in browser): ember-qunit
We have a huge testsuite. Some testcases have been set assert.timeout option upto 3 to 5 minutes. We cannot remove this timeout option for now. Sometimes when any exception is thrown, tests are hanging for a long time (upto the timeout mentioned) before moving to the next testcase. We want to abort a test immediately if it throws any uncaught exception (not any test assertion failures) and proceed to next testcase. We couldn't able to find any option to do so. Is there any way to achieve this?
The text was updated successfully, but these errors were encountered:
I'm re-opening this as I think I can learn from your experience.
We currently catch and report uncaught errors as failures inside the currently-running test (when possible). It would indeed be possible to cancel a pending timeout based on that. However, this can't be a total cancellation I think, since that would expose the test suite to race conditions with undefined consequences.
For example, if the test function is an async function, we wait for the promise to resolve. When errors are thrown inside a promise chain, these already cause the test to automatically reject the async/promise and thus there is a fast failure, no timeout.
In your case, where is this uncaught exception is coming from? Knowing this can help me understand if there's a general solution we can come up with to address this. I don't think cancelling timeouts would be what we want to do here, but perhaps there's something else we can recommend/document/improve. But - for this I need to understand a bit more about where the error was thrown from in your case.
We have a huge testsuite. Some testcases have been set
assert.timeout
option upto 3 to 5 minutes. We cannot remove thistimeout
option for now. Sometimes when any exception is thrown, tests are hanging for a long time (upto the timeout mentioned) before moving to the next testcase. We want to abort a test immediately if it throws any uncaught exception (not any test assertion failures) and proceed to next testcase. We couldn't able to find any option to do so. Is there any way to achieve this?The text was updated successfully, but these errors were encountered: