-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest-setup.ts
More file actions
29 lines (25 loc) · 811 Bytes
/
jest-setup.ts
File metadata and controls
29 lines (25 loc) · 811 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
import '@testing-library/react-native/extend-expect';
jest.mock('react-native-app-auth', () => ({
authorize: jest.fn(),
refresh: jest.fn(),
}));
jest.mock('react-native-encrypted-storage', () => ({
setItem: jest.fn(() => Promise.resolve()),
getItem: jest.fn(() => Promise.resolve(null)),
removeItem: jest.fn(() => Promise.resolve()),
clear: jest.fn(() => Promise.resolve()),
}));
jest.mock('@sentry/react-native', () => ({
ReactNativeClient: jest.fn().mockReturnValue({
init: jest.fn(),
}),
Scope: jest.fn().mockReturnValue({
setClient: jest.fn(),
setExtra: jest.fn(),
addBreadcrumb: jest.fn(),
captureException: jest.fn(),
}),
}));
jest.mock('@sentry/react-native/dist/js/integrations/default', () => ({
getDefaultIntegrations: jest.fn().mockReturnValue([]),
}));