File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import 'react-native' ;
6
6
import React from 'react' ;
7
- import App from '../App' ;
7
+ import App from '../App/App ' ;
8
8
9
9
// Note: test renderer must be required after react-native.
10
10
import renderer from 'react-test-renderer' ;
Original file line number Diff line number Diff line change
1
+ jest . mock ( 'react-native-gesture-handler' , ( ) => {
2
+ const View = require ( 'react-native/Libraries/Components/View/View' ) ;
3
+ return {
4
+ Swipeable : View ,
5
+ DrawerLayout : View ,
6
+ State : { } ,
7
+ ScrollView : View ,
8
+ Slider : View ,
9
+ Switch : View ,
10
+ TextInput : View ,
11
+ ToolbarAndroid : View ,
12
+ ViewPagerAndroid : View ,
13
+ DrawerLayoutAndroid : View ,
14
+ WebView : View ,
15
+ NativeViewGestureHandler : View ,
16
+ TapGestureHandler : View ,
17
+ FlingGestureHandler : View ,
18
+ ForceTouchGestureHandler : View ,
19
+ LongPressGestureHandler : View ,
20
+ PanGestureHandler : View ,
21
+ PinchGestureHandler : View ,
22
+ RotationGestureHandler : View ,
23
+ /* Buttons */
24
+ RawButton : View ,
25
+ BaseButton : View ,
26
+ RectButton : View ,
27
+ BorderlessButton : View ,
28
+ /* Other */
29
+ FlatList : View ,
30
+ gestureHandlerRootHOC : jest . fn ( ) ,
31
+ Directions : { } ,
32
+ } ;
33
+ } ) ;
Original file line number Diff line number Diff line change 46
46
"react-test-renderer" : " 16.8.3"
47
47
},
48
48
"jest" : {
49
- "preset" : " react-native"
49
+ "preset" : " react-native" ,
50
+ "transformIgnorePatterns" : [
51
+ " node_modules/(?!(jest-)?react-native|react-navigation|@react-navigation.*)"
52
+ ],
53
+ "setupFiles" : [
54
+ " ./jest.setup.js"
55
+ ]
50
56
}
51
57
}
You can’t perform that action at this time.
0 commit comments