You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to configure unit test with Jest but the tests are complaining that they dont understand React Native paper elements, so i figured that i had to mock all the components, but trying to create the actual mock has not work as expected. im getting this error
if i remove const originalModule = jest.requireActual("react-native-paper"); and mock them manually they work
Im having a weird error on this file (node_modules/react-native/src/private/animated/NativeAnimatedHelper.js:100:38) and im really lost here tbh
Expected behaviour
being able to configure tests
How to reproduce?
try to mock react native paper in a jest.setup.js file like this
Preview
What have you tried so far?
Your Environment
software
version
ios
x (doesnt matter)
android
x (doesnt matter)
react-native
0.76.3
react-native-paper
5.12.5
node
18.19.1
npm or yarn
10.2.4 (npm)
expo sdk
x.x.x (CLI app)
The text was updated successfully, but these errors were encountered:
then i realized that i needed to update node version to >= 20, also i was using npm then i switched to yarn and this problem wasnt there anymore, so maybe its something related to npm cache or npm itself (which i dont beleive is the case)
Current behaviour
Im trying to configure unit test with Jest but the tests are complaining that they dont understand React Native paper elements, so i figured that i had to mock all the components, but trying to create the actual mock has not work as expected. im getting this error
if i remove
const originalModule = jest.requireActual("react-native-paper");
and mock them manually they workIm having a weird error on this file (node_modules/react-native/src/private/animated/NativeAnimatedHelper.js:100:38) and im really lost here tbh
Expected behaviour
being able to configure tests
How to reproduce?
try to mock react native paper in a jest.setup.js file like this
Preview
What have you tried so far?
Your Environment
The text was updated successfully, but these errors were encountered: