-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.js
34 lines (32 loc) · 972 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
34
const { resolve, join } = require('path');
const APP_ROOT = resolve('.');
const REPORTS_DIR = join(APP_ROOT, 'reports');
module.exports = {
coverageDirectory: join(REPORTS_DIR, 'coverage'),
coveragePathIgnorePatterns: ['/node_modules/', '/tests/', '/src/migrations/', '/src/cli', '/lib/'],
coverageReporters: ['json-summary', 'text', 'text-summary', 'lcov'],
coverageThreshold: {
global: {
branches: 40,
functions: 40,
lines: 40,
statements: 40
}
},
globals: {
'ts-jest': {
tsconfig: `${APP_ROOT}/tsconfig.json`,
babelConfig: false
}
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
testEnvironment: 'node',
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$',
testURL: 'http://localhost',
transform: {
'\\.(ts|tsx)$': 'ts-jest'
},
verbose: true,
testMatch: null,
preset: 'ts-jest'
};