While running jest I am getting this strange warning stating
console.error node_modules/fbjs/lib/warning.js:33
Warning: Failed prop type: Invalid prop `opacity` of type `object` supplied to `Image`, expected `number`.
Bad object: {
"position": "absolute",
"top": 40,
"right": 24,
"opacity": {
"_children": [],
"_value": 0.5,
"_startingValue": 0.5,
"_offset": 0,
"_animation": null,
"_listeners": {}
}
}
in Image
and my actaul component code is the following
<Animated.Image
source={require('../loginUserPicture.png')}
style={[
styles.loginUserPicture,
{
opacity: animatedOpacity,
transform: [{
scale: animateUserIcon
}]
}
]}
/>
Could anyone help me in getting rid of this warning. From the waning message I can see that the test framework is not recognizing the Animated value.
It is not mentioned anywhere in the documentation and seems like no one else is getting this warning. Please let me know if I am doing anything wrong.