-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow regexes in t.like
#3309
Comments
Currently |
This comment was marked as duplicate.
This comment was marked as duplicate.
Maybe:
|
I agree that this looks useful, and your logic makes sense, but I don't immediately see how this could be implemented. Don't let that stop you though 😉 It may also technically be a breaking change, in that if you've written an existing assertion expecting a regular expression, and your actual value changes to a string, that happens to match… the test passes when it shouldn't. OK that seems unlikely. |
The
message
property int.throws
is really ergonomic - it can be astring
,RegExp
, or even a function.t.like
should be just as ergonomic with strings:A motivating example is trying to convert this test from
npm-user
to uset.like
:The text was updated successfully, but these errors were encountered: