-
-
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
Crash when potentialError is null #6896
Comments
Mind putting together a small repro on e.g. repl.it? Or event better, a PR :) |
It's more work to create a repro than a PR so I will send a PR. I did verify the fix (also checking for null) by modifying the file in node_modules for the affected repo. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
I got this error in my testsuite:
It seems that isError in jest-jasmine2 does not consider null. The typeof === 'object' check is true for null but the code assumes that succeeding that checks makes it possible to read the property message.
https://github.com/facebook/jest/blob/c93e02718480b9f25b0d28f33456ed159bd11b69/packages/jest-jasmine2/src/is_error.js#L15
A clear and concise description of what the bug is.
This seems to happen when null is thrown inside a promise.
The text was updated successfully, but these errors were encountered: