-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Wrap Error.captureStackTrace
in a try
#4035
Conversation
This looks good. Can you elaborate the code comment a bit, saying that "Guard for some environments (browsers) that do not support this feature."? |
Woah, quick! Sure 🙂 |
Looks good @SimenB! |
* Wrap `Error.captureStackTrace` in a try Ref jestjs#4027 * Remove console.log * Add comment * Improve test * Readd assertion * Last assertion tweak
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Ref #4027
This is a poor-man's version, but it works OK. Not sure we really need to fix it more?
Could put the logic to remove
JestAssertionError
along with the rest of the stack trace cleanup and avoidError.captureStackTrace
all together?/cc @skovhus
Test plan
Tests running in browsers should show assertion errors.