-
-
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
Change expect.not.objectContaining() to match documentation #10708
Conversation
89bb9bf
to
a6e5cb6
Compare
Nah, don't worry about that - mac CI something just decides to not work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Since we reverted #10508, which parts of this should stay or go? My brain is currently mush, so I was unable to decipher it 😛 |
I think it just needs a rebase that applies the |
Asserts that ObjectNotContaining matches values which do not contain _all_ of the sample's properties. Asserts that ObjectNotContaining matches iff ObjectContaining does not match.
a6e5cb6
to
708e68e
Compare
Rebased on master (2fa34c4). Moved one test case which relied on the now-reverted recursive behavior. |
* master: (398 commits) chore(breaking): remove undocumented `enabledTestsMap` config (jestjs#10787) Change expect.not.objectContaining() to match documentation (jestjs#10708) chore: add name to root project (jestjs#10782) Added explanation on how to use custom @jest-environment to docs (jestjs#10783) fix: remove deprecated functions from the jest object (jestjs#9853) chore: convert jest-runtime to ESM (jestjs#10325) fix(resolve): use escalade to find package.json (jestjs#10781) feat(jest-runner): set exit code to 1 if test logs after teardown (jestjs#10728) chore: add `exports` field to all `package.json`s (jestjs#9921) fix: do not inject `global` variable into module wrapper (jestjs#10644) chore: migrate jest-resolve to ESM (jestjs#10688) chore(transform): refactor API to pass an options bag around rather than multiple boolean options (jestjs#10753) chore: default to node test env rather than browser (jestjs#9874) fix: drop support for node 13 (jestjs#10685) chore: show enhanced syntax error for all syntax errors (jestjs#10749) chore: update lockfile after publish v26.6.3 chore: update changelog for release Don't throw an error if mock dependency can't be found (jestjs#10779) chore: bump babel core types (jestjs#10772) ...
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
Fixes #10186 by changing
expect.not.objectContaining()
to simply invert the result ofexpect.objectContaining()
.By semver this is a patch-level change, but I agree with jeysal that it would be prudent to treat this as a breaking change anyway, just in case someone's relying on the previous behavior.
Test plan
Revised existing tests which asserted undocumented behavior and added several new test cases.