This repository was archived by the owner on Jul 30, 2020. It is now read-only.
File tree 3 files changed +47
-3
lines changed
3 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 1
1
import '@testing-library/jest-native/extend-expect' ;
2
2
import React from 'react' ;
3
3
import { Button , Text , View } from 'react-native' ;
4
- import { createStackNavigator , createAppContainer , withNavigation } from 'react-navigation' ;
4
+ import { createAppContainer , withNavigation } from 'react-navigation' ;
5
+ import { createStackNavigator } from 'react-navigation-stack' ;
5
6
6
7
import { render , fireEvent } from '../../src' ;
7
8
15
16
BaseButton : View ,
16
17
Directions : { } ,
17
18
} ;
19
+ } )
20
+ . mock ( 'react-native-reanimated' , ( ) => {
21
+ const View = require ( 'react-native' ) . View ;
22
+
23
+ const Easing = {
24
+ linear : jest . fn ( ) ,
25
+ ease : jest . fn ( ) ,
26
+ quad : jest . fn ( ) ,
27
+ cubic : jest . fn ( ) ,
28
+ poly : jest . fn ( ) ,
29
+ sin : jest . fn ( ) ,
30
+ circle : jest . fn ( ) ,
31
+ exp : jest . fn ( ) ,
32
+ elastic : jest . fn ( ) ,
33
+ back : jest . fn ( ) ,
34
+ bounce : jest . fn ( ) ,
35
+ bezier : jest . fn ( ) ,
36
+ in : jest . fn ( ) ,
37
+ out : jest . fn ( ) ,
38
+ inOut : jest . fn ( ) ,
39
+ } ;
40
+
41
+ return {
42
+ Easing,
43
+ Value : jest . fn ( ) ,
44
+ event : jest . fn ( ) ,
45
+ add : jest . fn ( ) ,
46
+ eq : jest . fn ( ) ,
47
+ set : jest . fn ( ) ,
48
+ cond : jest . fn ( ) ,
49
+ interpolate : jest . fn ( ) ,
50
+ View : View ,
51
+ Extrapolate : { CLAMP : jest . fn ( ) } ,
52
+ Transition : {
53
+ Together : 'Together' ,
54
+ Out : 'Out' ,
55
+ In : 'In' ,
56
+ } ,
57
+ } ;
18
58
} ) ;
19
59
20
60
const Home = ( { navigation } ) => (
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const jestPreset = require('react-native/jest-preset');
3
3
module . exports = Object . assign ( jestPreset , {
4
4
transformIgnorePatterns : [
5
5
...jestPreset . transformIgnorePatterns ,
6
- 'node_modules/(?!(react-native.*|@?react-navigation.*)/)' ,
6
+ 'node_modules/(?!(react-native.*|@?react-navigation.*|@?react-native-community.* )/)' ,
7
7
] ,
8
8
snapshotSerializers : [ require . resolve ( './dist/preset/serializer.js' ) ] ,
9
9
setupFiles : [ ...jestPreset . setupFiles , require . resolve ( './dist/preset/setup.js' ) ] ,
Original file line number Diff line number Diff line change 55
55
"jest-fetch-mock" : " ^2.1.1" ,
56
56
"jest-in-case" : " ^1.0.2" ,
57
57
"metro-react-native-babel-preset" : " ^0.52.0" ,
58
+ "react-native-safe-area-context" : " 0.6.1" ,
59
+ "@react-native-community/masked-view" : " 0.1.5" ,
58
60
"prettier" : " ^1.16.4" ,
61
+ "react-native-reanimated" : " 1.4.0" ,
59
62
"pretty-quick" : " ^1.10.0" ,
60
63
"react" : " 16.9.0" ,
61
64
"react-hooks-testing-library" : " ^0.5.0" ,
62
65
"react-intl" : " ^2.8.0" ,
63
66
"react-intl-native" : " ^2.1.2" ,
64
67
"react-native" : " ^0.61.1" ,
65
68
"react-native-gesture-handler" : " ^1.1.0" ,
66
- "react-navigation" : " ^3.5.1" ,
69
+ "react-navigation" : " 4.0.10" ,
70
+ "react-navigation-stack" : " 2.0.0-alpha.38" ,
67
71
"react-redux" : " ^7.0.3" ,
68
72
"react-test-renderer" : " 16.9.0" ,
69
73
"redux" : " ^4.0.1" ,
You can’t perform that action at this time.
0 commit comments