-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
21 lines (20 loc) · 798 Bytes
/
jest.setup.js
File metadata and controls
21 lines (20 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import "react-native-gesture-handler/jestSetup";
jest.mock("@react-native-async-storage/async-storage", () =>
require("@react-native-async-storage/async-storage/jest/async-storage-mock"),
);
jest.mock("@sentry/react-native", () => ({
init: jest.fn(),
ReactNavigationInstrumentation: jest.fn(),
ReactNativeTracing: jest.fn(),
wrap: (c) => c,
}));
jest.mock("react-native-safe-area-context", () => {
const inset = { top: 0, right: 0, bottom: 0, left: 0 };
return {
...jest.requireActual("react-native-safe-area-context"),
SafeAreaProvider: jest.fn(({ children }) => children),
SafeAreaConsumer: jest.fn(({ children }) => children(inset)),
useSafeAreaInsets: jest.fn(() => inset),
useSafeAreaFrame: jest.fn(() => ({ x: 0, y: 0, width: 390, height: 844 })),
};
});