Skip to content
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

Revert "fix(expect): objectContaining should recurse into sub-objects (#10508)" #10766

Merged
merged 7 commits into from
Nov 2, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Nov 2, 2020

Summary

Fixes #10716

Test plan

Green CI. Kept some of the tests added later for the mutation regression

@@ -9,7 +9,7 @@
- `[babel-plugin-jest-hoist]` Preserve order of hoisted mock nodes within containing block ([#10536](https://github.com/facebook/jest/pull/10536))
- `[babel-plugin-jest-hoist]` Hoist pure constants to support experimental JSX transform in hoisted mocks ([#10723](https://github.com/facebook/jest/pull/10723))
- `[babel-preset-jest]` Update `babel-preset-current-node-syntax` to support top level await ([#10747](https://github.com/facebook/jest/pull/10747))
- `[expect]` Stop modifying the sample in `expect.objectContaining()` ([#10711](https://github.com/facebook/jest/pull/10711))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never released, so I just removed it. Keeping the test, tho 👍

@@ -93,7 +93,14 @@ describe('caller option correctly merges from defaults and options', () => {

expect(loadPartialConfig).toHaveBeenCalledTimes(1);
expect(loadPartialConfig).toHaveBeenCalledWith(
expect.objectContaining({caller: {name: 'babel-jest', ...output}}),
expect.objectContaining({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good example of the use case of expect.objectContaining current behavior - I only care about a subset of the properties, but I care about all of their properties

should probably add a test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added here: cda33c9 (#10766)

@SimenB SimenB merged commit 1dbdd67 into jestjs:master Nov 2, 2020
@SimenB SimenB deleted the revert-recursive-object-matching branch November 2, 2020 11:45
This was referenced Mar 15, 2021
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

toHaveBeenCalledWith objectContaining issue after patch update 26.6.1
2 participants