mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 22:30:36 +08:00
47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
import { NativeModules } from 'react-native';
|
|
|
|
NativeModules.ReactLocalization = {
|
|
language: 'en',
|
|
};
|
|
|
|
// TODO: remove these mocks!
|
|
jest.mock('react-native-gesture-handler', () => {
|
|
const View = require('react-native/Libraries/Components/View/View');
|
|
return {
|
|
Swipeable: View,
|
|
DrawerLayout: View,
|
|
State: {},
|
|
ScrollView: View,
|
|
Slider: View,
|
|
Switch: View,
|
|
TextInput: View,
|
|
ToolbarAndroid: View,
|
|
ViewPagerAndroid: View,
|
|
DrawerLayoutAndroid: View,
|
|
WebView: View,
|
|
NativeViewGestureHandler: View,
|
|
TapGestureHandler: View,
|
|
FlingGestureHandler: View,
|
|
ForceTouchGestureHandler: View,
|
|
LongPressGestureHandler: View,
|
|
PanGestureHandler: View,
|
|
PinchGestureHandler: View,
|
|
RotationGestureHandler: View,
|
|
/* Buttons */
|
|
RawButton: View,
|
|
BaseButton: View,
|
|
RectButton: View,
|
|
BorderlessButton: View,
|
|
/* Other */
|
|
FlatList: View,
|
|
gestureHandlerRootHOC: jest.fn(),
|
|
Directions: {},
|
|
};
|
|
});
|
|
|
|
jest.mock('react-native-gesture-handler/DrawerLayout', () => {
|
|
return {
|
|
Directions: null,
|
|
};
|
|
});
|