From 7b5a7c6d1c932b36fb0972b4ff3c8e5618c65708 Mon Sep 17 00:00:00 2001 From: Steven Musumeche Date: Thu, 20 Feb 2020 18:40:43 -0600 Subject: [PATCH] fix tests and formatting --- packages/material-ui/src/CardMedia/CardMedia.js | 4 +++- packages/material-ui/src/CardMedia/CardMedia.test.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/material-ui/src/CardMedia/CardMedia.js b/packages/material-ui/src/CardMedia/CardMedia.js index f062d5357ae3a4..9c974c6be5ead4 100644 --- a/packages/material-ui/src/CardMedia/CardMedia.js +++ b/packages/material-ui/src/CardMedia/CardMedia.js @@ -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; }), diff --git a/packages/material-ui/src/CardMedia/CardMedia.test.js b/packages/material-ui/src/CardMedia/CardMedia.test.js index 1acc473eff3aaa..8cf27a9ad467f2 100644 --- a/packages/material-ui/src/CardMedia/CardMedia.test.js +++ b/packages/material-ui/src/CardMedia/CardMedia.test.js @@ -91,13 +91,13 @@ describe('', () => { 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(); 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.', ); }); });