forked from thisisqubika/react-native-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.setup.js
23 lines (17 loc) · 777 Bytes
/
jest.setup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock';
import { NativeModules } from 'react-native';
NativeModules.ReactLocalization = { language: 'en' };
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
jest.mock('@react-native-async-storage/async-storage', () => mockAsyncStorage);
jest.mock('react-native-bootsplash', () => ({
hide: jest.fn().mockResolvedValueOnce(),
getVisibilityStatus: jest.fn().mockResolvedValue('hidden'),
}));
jest.mock('react-native-config', () => ({
Config: {
API_BASE_URL: 'XXX',
BUILD_VARIANT: 'TEST',
},
}));
// Silence the warning: Animated: `useNativeDriver` is not supported
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');