-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
39 lines (38 loc) · 1002 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
cacheDirectory: __dirname + '/.jest_cache',
roots: ['<rootDir>/src'],
preset: 'ts-jest',
testRegex: '(.*.(test|spec)).(jsx?|tsx?|ts?)$',
moduleFileExtensions: ['ts', 'js', 'json', 'tsx'],
setupFilesAfterEnv: ['./src/tests/setupTests.ts'],
collectCoverage: true,
collectCoverageFrom: [
'**/src/**/*.ts',
'!**/node_modules/**',
'!**/*.test.data.ts',
],
coverageThreshold: {
global: {
statements: 0,
branches: 0,
functions: 0,
lines: 0,
},
},
reporters: [
'default',
[
'jest-junit',
{
outputName: 'junit-TEST.xml',
},
],
],
coveragePathIgnorePatterns: [
'.*test\\.data\\.ts$,migrations.*.ts$,(.*.(test|spec)).(jsx?|tsx?)$,(tests/.*.mock).(jsx?|tsx?)$',
],
coverageReporters: ['json', 'lcov', 'text', 'clover', 'cobertura'],
verbose: true,
}