-
Notifications
You must be signed in to change notification settings - Fork 5
/
jest.config.js
37 lines (37 loc) · 929 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
35
36
37
module.exports = {
roots: ['<rootDir>/src/test'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/src/$1',
'@root/(.*)': '<rootDir>/$1'
},
verbose: true,
testEnvironment: 'node',
collectCoverage: true,
collectCoverageFrom: [
'!<rootDir>/node_modules/*',
'!<rootDir>/src/test/**/*',
'!<rootDir>/src/consts/*',
'!<rootDir>/src/configs/*',
'!<rootDir>/docs/*',
'!<rootDir>/src/emails/*',
'!<rootDir>/*.json',
'!<rootDir>/*.yaml'
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
coverageReporters: ['html', 'lcov'],
coverageDirectory: '<rootDir>/src/test/coverage',
testTimeout: 12000,
testMatch: [
'<rootDir>/src/test/integration/**/*.spec.js',
'<rootDir>/src/test/unit/**/*.spec.js',
'<rootDir>/src/test/migrations/*.spec.js'
],
testResultsProcessor: 'jest-sonar-reporter'
}