-
-
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
fix(objectContaining): Fixed a bug where ObjectContaining matched with non-object values. #15462
fix(objectContaining): Fixed a bug where ObjectContaining matched with non-object values. #15462
Conversation
…h non-object values.
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ff0d770
to
569ba43
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The
objectContaining
method matches withnon-object
values, which is inconsistent. Thanks to @flovouin for finding this bug!This PR fixes: #15420
This PR does the following:
expect
is an object.invalid
test cases for the above bug.Test plan
This is the new code I wrote for the
objectContaining
implementation:This is the new test cases I wrote for verifying the above added code works:
To run the tests, I ran the following command:
The test results: