forked from segmentio/typewriter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
58 lines (58 loc) · 1.46 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export default {
verbose: true,
rootDir: './',
roots: ['<rootDir>'],
prettierPath: 'prettier',
coverageDirectory: '<rootDir>/reports/coverage',
coverageReporters: [['lcov', { projectRoot: '/' }], 'text', 'text-summary', 'clover', 'html'],
reporters: ['default'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: false,
isolatedModules: true,
sourceMap: true,
inlineSourceMap: true,
tsconfig: '<rootDir>/tsconfig.json',
},
],
},
transformIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/reports/', '<rootDir>/node_modules/'],
testMatch: [
'<rootDir>/tests/**/*.(spec|test).(j|t)s?(x)',
'<rootDir>/src/**/*.(spec|test).(j|t)s?(x)',
],
testPathIgnorePatterns: [
'__mocks__',
'__fixtures__',
'<rootDir>/node_modules/',
'<rootDir>/tests/e2e/.*',
'<rootDir>/example',
],
collectCoverageFrom: [
'<rootDir>/src/**/*.{js,ts,tsx}',
'!<rootDir>/**/types.ts',
'!<rootDir>/**/*.d.*',
'!<rootDir>/**/*.test.js',
'!<rootDir>/**/test/*.js',
],
coveragePathIgnorePatterns: [
'\\\\node_modules\\\\',
'<rootDir>/node_modules/',
'\\\\dist\\\\',
'\\\\tests\\\\',
],
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
setupFilesAfterEnv: ['jest-expect-message'],
cacheDirectory: '../../node_modules/.cache/unit-tests',
clearMocks: true,
modulePaths: ['<rootDir>/'],
};