Skip to content

Commit

Permalink
fix tests and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmusumeche committed Feb 21, 2020
1 parent d2d5173 commit 7b5a7c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/material-ui/src/CardMedia/CardMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ CardMedia.propTypes = {
*/
children: chainPropTypes(PropTypes.node, props => {
if (!props.children && !props.image && !props.src && !props.component) {
return new Error('Material-UI: either `children`, `image`, `src` or `component` prop must be specified.');
return new Error(
'Material-UI: either `children`, `image`, `src` or `component` prop must be specified.',
);
}
return null;
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/CardMedia/CardMedia.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ describe('<CardMedia />', () => {
PropTypes.resetWarningCache();
});

it('warns when neither `children`, nor `image`, nor `src` are provided', () => {
it('warns when neither `children`, nor `image`, nor `src`, nor `component` are provided', () => {
mount(<CardMedia />);

assert.strictEqual(consoleErrorMock.callCount(), 1);
assert.include(
consoleErrorMock.args()[0][0],
'Material-UI: either `children`, `image` or `src` prop must be specified.',
'Material-UI: either `children`, `image`, `src` or `component` prop must be specified.',
);
});
});
Expand Down

0 comments on commit 7b5a7c6

Please sign in to comment.