-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
38 lines (38 loc) · 1.72 KB
/
jest.config.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
37
38
module.exports = {
preset: 'react-native',
setupFiles: [
'<rootDir>/__mock__/react-native-device-info.ts',
'<rootDir>/__mock__/react-native-code-push.js',
'<rootDir>/__mock__/react-native-datetimepicker.ts',
'<rootDir>/__mock__/react-native-firebase.ts',
'<rootDir>/__mock__/@react-native-community/google-signin.ts',
'<rootDir>/__mock__/react-native-localize.ts',
'<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js',
'<rootDir>/__mock__/rollbar-react-native.js',
'<rootDir>/__mock__/react-native-reanimated.ts',
'<rootDir>/__mock__/react-native-push-notification.ts',
'<rootDir>/__mock__/push-notification-ios.ts',
'<rootDir>/__mock__/init-i18next.js',
'<rootDir>/__mock__/apolloClient.ts',
'<rootDir>/__mock__/react-native-camera.ts',
'<rootDir>/__mock__/react-native-video.ts',
require.resolve('jest-expo/src/preset/setup.js'),
],
setupFilesAfterEnv: [
'<rootDir>/__mock__/hideWarnings.ts',
'<rootDir>/__mock__/resetGlobalMockSeeds.ts',
'<rootDir>/__mock__/apolloHooks.ts',
'<rootDir>/__mock__/cleanup.ts',
],
globalSetup: '<rootDir>/__mock__/globalSetup.ts',
moduleNameMapper: {
'\\.svg$': '<rootDir>/__mock__/svgMock.ts',
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|react-navigation-redux-helpers|@invertase/react-native-apple-authentication)',
],
testPathIgnorePatterns: ['src/components/Touchable/__tests__/index.d.ts'],
coverageDirectory: './coverage/',
collectCoverageFrom: ['src/**/*.{js,ts,tsx}', '!src/**/*.d.ts'],
clearMocks: true,
};