You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 1.3.1. Not sure if intended.
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 1.3.1. Not sure if intended.
Yeah, this was fixed but not released yet. 1.5.0 should be released this week.
The fix seems to be a more descriptive error, but for our case it is a breaking change since the test was passing in 1.3.1. Not sure if intended.
Hmm, right, I didn't notice at all, but this is technically a breaking change. Previously we were using chai assertion this.match(expected), which covers many cases like Error example you had, but now I changed it to simple string.match(expected).
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: