-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (28 loc) · 1.03 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
module.exports = {
preset: 'jest-expo',
verbose: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
globals: {
window: {},
},
collectCoverage: true,
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
moduleNameMapper: {
'\\.svg': '<rootDir>/__mocks__/svg-mock.js',
'\\.png': '<rootDir>/__mocks__/png-mock.js',
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@react-native|react-native|@react-native-picker/picker|@react-navigation|react-navigation|@react-native-community|@sentry/react-native|@react-native-firebase/messaging|@invertase/react-native-apple-authentication|expo(nent)?|@expo(nent)?/.*|@unimodules/.*|unimodules|jest-expo|@aaqua/autocomplete)',
],
coveragePathIgnorePatterns: ['.generated.ts'],
setupFiles: ['./jest.setup.js'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
testEnvironment: 'jsdom', // https://github.com/facebook/jest/issues/4359#issuecomment-506735229
};