Closed RicardoBrito1938 closed 4 years ago
in case some one had the same issue i figured by adding
"node_modules/(?!(jest-)?react-native|@react-native-community|react-navigation|react-navigation-redux-helpers|@react-navigation/.*)"
]```
and then mocking on my jest.setup
``` jest.mock('react-native-gesture-handler', () => {
// eslint-disable-next-line global-require
const View = require('react-native/Libraries/Components/View/View');
return {
Swipeable: View,
DrawerLayout: View,
State: {},
ScrollView: View,
Slider: View,
Switch: View,
TextInput: View,
ToolbarAndroid: View,
ViewPagerAndroid: View,
DrawerLayoutAndroid: View,
WebView: View,
NativeViewGestureHandler: View,
TapGestureHandler: View,
FlingGestureHandler: View,
ForceTouchGestureHandler: View,
LongPressGestureHandler: View,
PanGestureHandler: View,
PinchGestureHandler: View,
RotationGestureHandler: View,
/* Buttons */
RawButton: View,
BaseButton: View,
RectButton: View,
BorderlessButton: View,
/* Other */
FlatList: View,
gestureHandlerRootHOC: jest.fn(),
Directions: {},
};
});
jest.mock('react-native-reanimated', () =>
require('react-native-reanimated/mock')
);
jest.mock('react-native-tab-view', () => {});```
Hello team, i am trying to run tests on my code, but on configuration i found the following error
after i added in my jest config
now i have the followgin error
does anyone have an idea how to fix it?