Closed ngmikeng closed 2 years ago
@ngmikeng I'm sure you've figured this out by now but incase you haven't.
I seen the same thing and realized it came from react-native-reanimated not being mocked in the test. You can add the following to your setup-test
or specific test file.
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
I still ended up with more errors from this library around fontsize, but I am still looking into that.
I am getting this error for the same issue above:
Warning: Failed prop type: Invalid prop fontSize
of type object
supplied to Text
, expected number
.
Bad object: {
"paddingVertical": 10,
"fontSize": {
" __value": 12
},
"fontFamily": "Poppins_400Regular",
"left": 5,
"alignSelf": "center",
"position": "absolute",
"flex": 1,
"zIndex": 999,
"transform": [
{
"translateX": {
" value": 0
}
},
{
"translateY": {
" value": 0
}
}
]
}
Hi guys, this issue should be fixed in the next version.
New version released should fix this!
@robsmithw, @vinniimiranda and @ngmikeng, can you please try the latest version?
I try test a component which is using the floating label input but it can't pass the unit test, but another components which are not using the floating label input passed the test.
It throws an error and some weird logs, have anyone seen this before?
Thanks for your contribution.