When we run yarn test it throws the following warning message
FAIL src/components/FactoryGrid/FactoryGrid.spec.jsx
● Console
console.error node_modules/prop-types/checkPropTypes.js:20
Warning: Failed prop type: Invalid prop `image` of type `object` supplied to `CardMedia`, expected `string`.
in CardMedia (created by WithStyles(CardMedia))
in WithStyles(CardMedia) (created by CrafterMachineNode)
in div (created by Paper)
in Paper (created by WithStyles(Paper))
in WithStyles(Paper) (created by Card)
in Card (created by WithStyles(Card))
in WithStyles(Card) (created by CrafterMachineNode)
in CrafterMachineNode (created by Block)
in div (created by Paper)
in Paper (created by WithStyles(Paper))
in WithStyles(Paper) (created by Card)
in Card (created by WithStyles(Card))
in WithStyles(Card) (created by Block)
in div (created by Block)
in Block (created by ConnectFunction)
in ConnectFunction (created by FactoryGrid)
in div (created by FactoryGrid)
in div (created by FactoryGrid)
in FactoryGrid (created by ConnectFunction)
in ConnectFunction
in Provider
● render simple Grid Component with 2x2 Blocks
This occurs because the property image passed in CardMedia is an object instead of a string.
I thought that we should be able to fix this one, but this react team post says that we can't use url strings for image paths using the non-ejected webpack configuration.
When we run
yarn test
it throws the following warning messageThis occurs because the property image passed in
CardMedia
is an object instead of a string. I thought that we should be able to fix this one, but this react team post says that we can't use url strings for image paths using the non-ejected webpack configuration.https://facebook.github.io/create-react-app/docs/adding-images-fonts-and-files https://github.com/facebook/create-react-app/issues/585