I test a component contains a child component has Image. I define propTypes of Image in in child component is number
. At main components I passed the image props by import
. But test file run warning Invalid prop iconBack
of type object
supplied to HeaderVideoNavigation
This is code at HeaderVideoNavigation
const HeaderVideoNavigation = props => (
<Container>
<IconContent>
<TouchableWithoutFeedback onPress={props.onPressBackIcon}>
<IconButton isDisplay source={props.iconBack} />
</TouchableWithoutFeedback>
</IconContent>
{!!props.editText && <EditText>{props.editText}</EditText>}
</Container>
)
and at main Component
<Header>
<HeaderVideoNavigation
onPressBackIcon={closeModal}
iconBack={Images.iconBackWhite}
/>
</Header>