-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
41 lines (41 loc) · 1.05 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
39
40
41
module.exports = {
transform: {
'^.+\\.tsx?$': '<rootDir>/node_modules/ts-jest/preprocessor.js',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
testPathIgnorePatterns: ['(/__tests__/__support__/).*$'],
transformIgnorePatterns: ['<rootDir>/packages/.+/node_modules/(?!@findify)'],
roots: ['<rootDir>'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'\\.(css|svg)$': 'identity-obj-proxy',
},
snapshotSerializers: ['enzyme-to-json/serializer'],
globals: {
'ts-jest': {
skipBabel: true,
tsConfigFile: './tsconfig.test.json',
},
},
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/vendor/**',
'!**/output/**',
],
coverageReporters: ['json', 'lcov', 'text', 'html'],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60,
},
'./packages/src/**/*.{ts,tsx}': {
branches: 80,
statements: 80,
},
},
};