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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/babel-jest/src/__tests__/index.ts
Expand Up @@ -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)

caller: {
name: 'babel-jest',
...output,
supportsExportNamespaceFrom: false,
supportsTopLevelAwait: false,
},
}),
);
});
});
Expand All @@ -110,7 +117,9 @@ test('can pass null to createTransformer', () => {
caller: {
name: 'babel-jest',
supportsDynamicImport: false,
supportsExportNamespaceFrom: false,
supportsStaticESM: false,
supportsTopLevelAwait: false,
},
}),
);
Expand Down