-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TypeError: actual.match is not a function #5513
Comments
sorry, for some reason I didn't see #5428 is this possibly already fixed? edit: The fix seems to be a more descriptive error, but for our case it is a breaking change since the test was passing in |
Yeah, this was fixed but not released yet. 1.5.0 should be released this week. |
Hmm, right, I didn't notice at all, but this is technically a breaking change. Previously we were using chai assertion Depending on the report (now already two from your case and also from btea's case), we might need to consider making it more aligned with original chai assertion. |
Describe the bug
Pre
1.4.0
we were testing promises that were rejected withError
using:await expect(rejectedPromise).rejects.toMatch(/invalid/);
but now it's throwing:
TypeError: actual.match is not a function
Using
toThrow()
instead fixes the issue.I'm not sure if the error is expected but the message is not really helpful.
This is probably related to #5267.
Reproduction
v1.4.0
v1.3.1
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: