File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 161
161
" ./testenv.js"
162
162
],
163
163
"transformIgnorePatterns" : [
164
- " node_modules/(?!(jest-)?react-native|react-navigation)"
164
+ " node_modules/(?!(jest-)?react-native|react-navigation|@react-native-community )"
165
165
],
166
166
"moduleNameMapper" : {
167
167
"styled-components" : " <rootDir>/node_modules/styled-components/dist/styled-components.native.cjs.js"
Original file line number Diff line number Diff line change 1
1
import 'react-native' ;
2
2
import 'react-native-mock' ;
3
+ import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock' ;
3
4
import Enzyme from 'enzyme' ;
4
5
import Adapter from 'enzyme-adapter-react-16' ;
5
6
@@ -26,6 +27,8 @@ jest.mock('react-native-i18n', () => {
26
27
} ;
27
28
} ) ;
28
29
30
+ jest . mock ( '@react-native-community/async-storage' , ( ) => mockAsyncStorage ) ;
31
+
29
32
jest . mock ( 'react-native-communications' , ( ) => ( {
30
33
web : jest . fn ( ) ,
31
34
email : jest . fn ( ) ,
You can’t perform that action at this time.
0 commit comments