-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
35 lines (34 loc) · 866 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
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'jest-preset-angular',
roots: ['<rootDir>/src/'],
testMatch: ['**/+(*.)+(spec).+(ts)'],
setupFilesAfterEnv: ['<rootDir>/setupJest.ts'],
collectCoverage: true,
coverageReporters: ['html', 'text', 'text-summary'],
coverageDirectory: "./coverage",
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: '<rootDir>/'
}),
collectCoverageFrom: [
"src/modules/**/*.(t|j)s",
"src/app/**/*.(t|j)s",
],
coveragePathIgnorePatterns: [
'index.ts',
'.config.ts',
'.interfaces.ts',
'.mock.ts',
'.models.ts',
'.module.ts'
],
coverageThreshold: {
global: {
branches: 65,
functions: 70,
lines: 80,
statements: 80
}
}
};