This repository was archived by the owner on Jul 30, 2020. It is now read-only.
File tree 3 files changed +3
-47
lines changed
3 files changed +3
-47
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 { createAppContainer , withNavigation } from 'react-navigation' ;
5
- import { createStackNavigator } from 'react-navigation-stack' ;
4
+ import { createStackNavigator , createAppContainer , withNavigation } from 'react-navigation' ;
6
5
7
6
import { render , fireEvent } from '../../src' ;
8
7
16
15
BaseButton : View ,
17
16
Directions : { } ,
18
17
} ;
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
- } ;
58
18
} ) ;
59
19
60
20
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.*|@?react-native-community.* )/)' ,
6
+ 'node_modules/(?!(react-native.*|@?react-navigation.*)/)' ,
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" ,
60
58
"prettier" : " ^1.16.4" ,
61
- "react-native-reanimated" : " 1.4.0" ,
62
59
"pretty-quick" : " ^1.10.0" ,
63
60
"react" : " 16.9.0" ,
64
61
"react-hooks-testing-library" : " ^0.5.0" ,
65
62
"react-intl" : " ^2.8.0" ,
66
63
"react-intl-native" : " ^2.1.2" ,
67
64
"react-native" : " ^0.61.1" ,
68
65
"react-native-gesture-handler" : " ^1.1.0" ,
69
- "react-navigation" : " 4.0.10" ,
70
- "react-navigation-stack" : " 2.0.0-alpha.38" ,
66
+ "react-navigation" : " ^3.5.1" ,
71
67
"react-redux" : " ^7.0.3" ,
72
68
"react-test-renderer" : " 16.9.0" ,
73
69
"redux" : " ^4.0.1" ,
You can’t perform that action at this time.
0 commit comments