-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
fix: support some virtual contexts in toThrow
#1609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :)
This adds support for VM situations where we pass a `RegExp` from another process. Note that we don't have a full fix for this stuff until `check-error` also supports `Error` being from another origin.
Adds support for throwing things like `undefined`, functions, etc.
@koddsson could you re-review this? i updated slightly to support throwing of anything (so even and i wrapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I have one question but happy to merge whatever the answer to that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
* fix: support some virtual contexts in `toThrow` This adds support for VM situations where we pass a `RegExp` from another process. Note that we don't have a full fix for this stuff until `check-error` also supports `Error` being from another origin. * fix: support throwing of unusual errors Adds support for throwing things like `undefined`, functions, etc. * chore: upgrade check-error
This adds support for VM situations where we pass a
RegExp
from another process.Note that we don't have a full fix for this stuff until
check-error
also supportsError
being from another origin.There's also a tiny fix in here for supporting
throw ''
. I have left a PR comment by the relevant line of code