-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (33 loc) · 980 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
26
27
28
29
30
31
32
33
module.exports = {
preset: 'react-native',
testPathIgnorePatterns: ['./node_modules/', './lib/'],
modulePathIgnorePatterns: ['./lib/'],
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!**/node_modules/**',
'!**/__flow__/**',
],
coverageDirectory: './coverage',
coverageThreshold: {
global: {
// @TODO push up over time
branches: 7,
functions: 12,
lines: 40,
statements: 45,
},
},
setupFilesAfterEnv: ['./jest/setupTests.js'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/jest/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg)$': '<rootDir>/jest/__mocks__/fileMock.js',
},
snapshotSerializers: ['enzyme-to-json/serializer'],
transform: {
'^.+\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
},
transformIgnorePatterns: [
'node_modules/(?!react-native|react-navigation|react-navigation-stack|react-native-gesture-handler)/',
],
};