Skip to content

Commit

Permalink
revert: fix: render counting
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 8, 2020
1 parent 62f9f63 commit 497ed0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,11 @@ describe('StylesProvider', () => {
<Test />
</StylesProvider>,
);
assert.strictEqual(consoleErrorMock.callCount(), 2);
assert.strictEqual(consoleErrorMock.callCount(), 1);
assert.include(
consoleErrorMock.messages()[0],
'you cannot use the jss and injectFirst props at the same time',
);
// one error per render (twice rendered in StrictMode)
assert.strictEqual(consoleErrorMock.messages()[0], consoleErrorMock.messages()[1]);
});
});
});
4 changes: 1 addition & 3 deletions packages/material-ui/src/GridList/GridList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,11 @@ describe('<GridList />', () => {
</GridList>,
);

assert.strictEqual(consoleErrorMock.callCount(), 2);
assert.strictEqual(consoleErrorMock.callCount(), 1);
assert.include(
consoleErrorMock.messages()[0],
"Material-UI: the GridList component doesn't accept a Fragment as a child.",
);
// one error per render (twice rendered in StrictMode)
assert.strictEqual(consoleErrorMock.messages()[0], consoleErrorMock.messages()[1]);
});
});
});
4 changes: 1 addition & 3 deletions packages/material-ui/src/Hidden/HiddenCss.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,11 @@ describe('<HiddenCss />', () => {
</HiddenCss>,
);

assert.strictEqual(consoleErrorMock.callCount(), 2);
assert.strictEqual(consoleErrorMock.callCount(), 1);
assert.include(
consoleErrorMock.messages()[0],
'Material-UI: unsupported props received by `<Hidden implementation="css" />`: xxlUp.',
);
// one error per render (twice rendered in StrictMode)
assert.strictEqual(consoleErrorMock.messages()[0], consoleErrorMock.messages()[1]);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,11 @@ describe('<InputAdornment />', () => {
/>
</FormControl>,
);
expect(consoleErrorMock.callCount()).to.equal(2);
expect(consoleErrorMock.callCount()).to.equal(1);
expect(consoleErrorMock.messages()[0]).to.equal(
'Material-UI: The `InputAdornment` variant infers the variant ' +
'prop you do not have to provide one.',
);
// one error per render (twice rendered in StrictMode)
expect(consoleErrorMock.messages()[0]).to.equal(consoleErrorMock.messages()[1]);
});
});
});
Expand Down

0 comments on commit 497ed0f

Please sign in to comment.