-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
35 lines (34 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
29
30
31
32
33
34
35
const { defaults: tsjPreset } = require('ts-jest/presets');
module.exports = {
...tsjPreset,
verbose: true,
automock: false,
collectCoverage: true,
preset: 'react-native',
transform: {
...tsjPreset.transform,
'\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
},
globals: {
'ts-jest': {
babelConfig: true,
},
},
transformIgnorePatterns: ['node_modules/(?!@platformbuilders|react-native)'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
testMatch: ['**/__tests__/*.spec.+(ts|tsx)'],
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
setupFiles: ['<rootDir>/src/tools/test-setup.ts'],
setupFilesAfterEnv: ['./node_modules/jest-enzyme/lib/index.js'],
unmockedModulePathPatterns: ['react', 'enzyme', 'jest-enzyme'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverageFrom: ['src/**/*.{ts|tsx}', 'src/**/{!(index),}.ts'],
moduleDirectories: ['node_modules', '<rootDir>'],
};