forked from wix/react-native-ui-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest-setup.js
17 lines (15 loc) · 801 Bytes
/
jest-setup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {NativeModules, AccessibilityInfo} from 'react-native';
NativeModules.StatusBarManager = {getHeight: jest.fn()};
jest.spyOn(AccessibilityInfo, 'isScreenReaderEnabled').mockImplementation(() => new Promise.resolve(false));
// mock native modules
jest.mock('@react-native-community/blur', () => {});
jest.mock('@react-native-community/netinfo', () => {});
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
global.__reanimatedWorkletInit = jest.fn();
jest.mock('react-native-gesture-handler', () => {});
jest.mock('@react-native-picker/picker', () => ({Picker: {Item: {}}}));
jest.mock('react-native', () => {
const reactNative = jest.requireActual('react-native');
reactNative.NativeModules.KeyboardTrackingViewTempManager = {};
return reactNative;
});