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

[test] Fix tests polluting DOM #18163

Merged
merged 1 commit into from
Nov 3, 2019
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
11 changes: 8 additions & 3 deletions packages/material-ui-lab/src/TreeItem/TreeItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ import TreeItem from './TreeItem';
import TreeView from '../TreeView';

describe('<TreeItem />', () => {
// StrictModeViolation: uses Collapse
let classes;
let mount;
const render = createClientRender({ strict: false });
const mount = createMount({ strict: false });
const classes = getClasses(<TreeItem nodeId="one" label="one" />);

before(() => {
// StrictModeViolation: uses Collapse
mount = createMount({ strict: false });
classes = getClasses(<TreeItem nodeId="one" label="one" />);
});

describeConformance(<TreeItem nodeId="one" label="one" />, () => ({
classes,
Expand Down
10 changes: 8 additions & 2 deletions packages/material-ui-lab/src/TreeView/TreeView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import TreeView from './TreeView';
import TreeItem from '../TreeItem';

describe('<TreeView />', () => {
let classes;
let mount;
// StrictModeViolation: test uses TreeItem
const render = createClientRender({ strict: false });
const mount = createMount({ strict: false });
const classes = getClasses(<TreeView />);

before(() => {
mount = createMount({ strict: true });
classes = getClasses(<TreeView />);
});

describeConformance(<TreeView />, () => ({
classes,
Expand Down