-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
25 lines (23 loc) · 628 Bytes
/
Copy pathjest.setup.js
File metadata and controls
25 lines (23 loc) · 628 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
/* eslint-env jest */
jest.mock("react-native-reanimated", () =>
require("react-native-reanimated/mock"),
);
jest.mock("expo-web-browser", () => ({
maybeCompleteAuthSession: jest.fn(),
openBrowserAsync: jest.fn(async () => ({ type: "opened" })),
}));
jest.mock("expo-network", () => ({
NetworkStateType: {
NONE: "NONE",
UNKNOWN: "UNKNOWN",
WIFI: "WIFI",
},
useNetworkState: jest.fn(() => ({
isConnected: true,
isInternetReachable: true,
type: "WIFI",
})),
getNetworkStateAsync: jest.fn(() =>
Promise.resolve({ isConnected: true, isInternetReachable: true, type: "WIFI" })
),
}));