Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/menus/src/containers/MenuContainer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ describe('MenuContainer', () => {
findTrigger(wrapper).simulate('click');

expect(wrapper.find('Portal').length).toBeGreaterThan(0);

wrapper.unmount();
});

it("doesn't render Popper element if menu is not open", () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/testing/src/utils/mountWithTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const mountWithTheme = (tree, { rtl, theme = {}, enzymeOptions } = {}) => {
.instance()
.getChildContext();

return mount(
tree,
{ context, childContextTypes: StyledThemeProvider.childContextTypes },
enzymeOptions
);
return mount(tree, {
...enzymeOptions,
context,
childContextTypes: StyledThemeProvider.childContextTypes
});
};

export default mountWithTheme;
10 changes: 5 additions & 5 deletions packages/testing/src/utils/renderWithTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const renderWithTheme = (tree, { rtl, theme, enzymeOptions } = {}) => {
.instance()
.getChildContext();

return render(
tree,
{ context, childContextTypes: StyledThemeProvider.childContextTypes },
enzymeOptions
);
return render(tree, {
...enzymeOptions,
context,
childContextTypes: StyledThemeProvider.childContextTypes
});
};

export default renderWithTheme;
2 changes: 1 addition & 1 deletion packages/testing/src/utils/shallowWithTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const shallowWithTheme = (tree, { rtl, theme, enzymeOptions } = {}) => {
.instance()
.getChildContext();

return shallow(tree, { context }, enzymeOptions);
return shallow(tree, { ...enzymeOptions, context });
};

export default shallowWithTheme;