-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.setup.ts
31 lines (27 loc) · 893 Bytes
/
jest.setup.ts
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
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');
jest.mock('@react-native-firebase/database', () => ({
firebase: {
app: jest.fn(() => ({
database: jest.fn(() => ({
ref: jest.fn(() => ({
on: jest.fn(),
})),
setPersistenceEnabled: jest.fn(),
})),
})),
},
}));
jest.mock('@react-native-firebase/app-check', () => ({
firebase: {
appCheck: jest.fn(() => ({
newReactNativeFirebaseAppCheckProvider: jest.fn(() => ({
configure: jest.fn(),
})),
initializeAppCheck: jest.fn(),
})),
},
}));
// include this line for mocking react-native-gesture-handler
import 'react-native-gesture-handler/jestSetup';
// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');