-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.setup.js
37 lines (26 loc) · 948 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
24
25
26
27
28
29
30
31
32
33
34
35
36
import '@testing-library/react-native/extend-expect';;
import * as matchers from "jest-extended";
import 'react-native-gesture-handler/jestSetup';
expect.extend(matchers);
jest.mock('@gorhom/bottom-sheet', () => ({
__esModule: true,
...require('@gorhom/bottom-sheet/mock')
}))
jest.mock('react-native-vector-icons/Octicons', () => 'Icon')
jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock');
Reanimated.default.call = () => { };
return Reanimated;
});
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
jest.mock('@react-navigation/stack', () => {
return {
createStackNavigator: () => ({
Navigator: ({ children }) => <div>{children}</div>, // Mock Navigator component
Screen: ({ children }) => <div>{children}</div>, // Mock Screen component
}),
};
});
afterEach(() => {
jest.useRealTimers();
});