-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
42 lines (40 loc) · 967 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
38
39
40
41
42
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
const jestConfig = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/server/**/*.{js,cjs}',
'<rootDir>/admin/**/*.{js,cjs}',
'!**/node_modules/**',
'!**/constants/**'
],
coverageDirectory: 'coverage',
coverageProvider: 'babel',
coverageReporters: ['html', 'text', 'text-summary', 'cobertura'],
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0
}
},
reporters: [
'default',
[
'jest-junit',
{ classNameTemplate: '{classname}', titleTemplate: '{title}', ancestorSeparator: ' > ' }
]
],
moduleFileExtensions: ['js', 'cjs'],
rootDir: './',
roots: ['<rootDir>/server/', '<rootDir>/admin/'],
verbose: true,
transform: {
'\\.[jt]s$': 'babel-jest'
}
};
module.exports = jestConfig;