-
-
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
error stack should be displayed for uncaught exceptions in async tests #958
Comments
Closed
see #815 |
This wasn't resolved with #815. We should still include the full stack trace of uncaught exceptions if provided, rather than throw out the error and create a new one with no context. Repro: https://jsfiddle.net/mgiuffrida/koLzuy6s/
Unhelpful error (no function stack or real line/col numbers):
Helpful error (with https://github.com/mgiuffrida/mocha/tree/patch-1):
|
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently exceptions in async tests lose their stack and display unfriendly message like:
This has been addressed recently in the HTML5 spec and can produce nice output like:
If the global handler in mocha re-uses the existing Error object like this:
Currently this extra arguments work in Canary, other browsers are likely to follow. Related blog post:
https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
The text was updated successfully, but these errors were encountered: