-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
25 lines (25 loc) · 907 Bytes
/
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
const jestConfig = {
preset: 'jest-expo',
setupFilesAfterEnv: ['./test/setupTests.ts'],
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
transform: {
'^.+\\.(t|j)sx?$': 'babel-jest',
},
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)',
],
moduleNameMapper: {
'\\.svg': '<rootDir>/src/test/__mocks__/svgMock.js',
'^@app/(.*)$': '<rootDir>/src/$1',
'\\.otf$': '<rootDir>/test/__mocks__/fileMock.js',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
verbose: true,
testEnvironment: 'jsdom',
coverageThreshold: {
global: {
lines: 60, // TODO: increase this to 70%
},
},
};
module.exports = jestConfig;