-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Matcher messages must be a function. #3921
Comments
Maybe worth scheduling for 21 if that's breaking? |
20.1 is fine. |
@cpojer Can you provide an example of the possible change? I didn't quite get what is the intended behavior. I can take it up! |
Basically remove this if-check and always treat message as a function: https://github.com/facebook/jest/blob/master/packages/jest-matchers/src/index.js#L105 and then update everywhere that may need updating, including the types. |
If no one is taking a look at this, then I'd like to give it a shot! |
Go for it! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
For performance reasons, we should make a breaking change that all matcher messages are functions typed
() => string
rather thanstring
. We already do that within all of Jest's matchers, but we don't enforce it. We should do this for 20.1.The text was updated successfully, but these errors were encountered: