Skip to content
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

Don't fail when a value can't be converted to a primitive #1924

Merged
merged 1 commit into from Mar 11, 2024

Conversation

thewilkybarkid
Copy link
Contributor

Using Fast Check's anything arbitrary, I saw it generated an object with a toString property that wasn't a function which returned a string, leading to a 'TypeError: Cannot convert object to primitive value' failure.

This change returns an empty Error in those cases.

thewilkybarkid added a commit to PREreview/prereview.org that referenced this pull request Mar 11, 2024
@gcanti gcanti merged commit 6e9f926 into gcanti:master Mar 11, 2024
1 check passed
@thewilkybarkid thewilkybarkid deleted the toerror branch March 11, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants