forked from react-navigation/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest-setup.js
More file actions
35 lines (29 loc) · 686 Bytes
/
jest-setup.js
File metadata and controls
35 lines (29 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* eslint-env jest */
jest.mock('@react-native-community/masked-view', () => () => null);
jest.mock('react-native-safe-area-context', () => {
const React = require('react');
const SafeAreaContext = React.createContext({
top: 0,
left: 0,
right: 0,
bottom: 0,
});
return {
__esModule: true,
SafeAreaContext,
SafeAreaProvider: SafeAreaContext.Provider,
SafeAreaConsumer: SafeAreaContext.Consumer,
};
});
jest.mock('react-native-gesture-handler', () => ({
PanGestureHandler: 'PanGestureHandler',
BaseButton: 'BaseButton',
State: {
UNDETERMINED: 0,
FAILED: 1,
BEGAN: 2,
CANCELLED: 3,
ACTIVE: 4,
END: 5,
},
}));