This repository was archived by the owner on Jul 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +47
-3
lines changed Expand file tree Collapse file tree 3 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 11import '@testing-library/jest-native/extend-expect' ;
22import React from 'react' ;
33import { 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' ;
56
67import { render , fireEvent } from '../../src' ;
78
1516 BaseButton : View ,
1617 Directions : { } ,
1718 } ;
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+ } ;
1858 } ) ;
1959
2060const Home = ( { navigation } ) => (
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const jestPreset = require('react-native/jest-preset');
33module . exports = Object . assign ( jestPreset , {
44 transformIgnorePatterns : [
55 ...jestPreset . transformIgnorePatterns ,
6- 'node_modules/(?!(react-native.*|@?react-navigation.*)/)' ,
6+ 'node_modules/(?!(react-native.*|@?react-navigation.*|@?react-native-community.* )/)' ,
77 ] ,
88 snapshotSerializers : [ require . resolve ( './dist/preset/serializer.js' ) ] ,
99 setupFiles : [ ...jestPreset . setupFiles , require . resolve ( './dist/preset/setup.js' ) ] ,
Original file line number Diff line number Diff line change 5555 "jest-fetch-mock" : " ^2.1.1" ,
5656 "jest-in-case" : " ^1.0.2" ,
5757 "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" ,
5860 "prettier" : " ^1.16.4" ,
61+ "react-native-reanimated" : " 1.4.0" ,
5962 "pretty-quick" : " ^1.10.0" ,
6063 "react" : " 16.9.0" ,
6164 "react-hooks-testing-library" : " ^0.5.0" ,
6265 "react-intl" : " ^2.8.0" ,
6366 "react-intl-native" : " ^2.1.2" ,
6467 "react-native" : " ^0.61.1" ,
6568 "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" ,
6771 "react-redux" : " ^7.0.3" ,
6872 "react-test-renderer" : " 16.9.0" ,
6973 "redux" : " ^4.0.1" ,
You can’t perform that action at this time.
0 commit comments