-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.js
37 lines (37 loc) · 994 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 = {
preset: 'jest-preset-angular',
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest'
},
resolver: '@nrwl/jest/plugins/resolver',
moduleFileExtensions: ['ts', 'js', 'html'],
coverageReporters: ['html'],
setupTestFrameworkScriptFile: '<rootDir>/jest/setupJest.ts',
setupFiles: ['jest-canvas-mock'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.spec.json',
stringifyContentPathRegex: '\\.html$',
astTransformers: ['jest-preset-angular/InlineHtmlStripStylesTransformer']
}
},
collectCoverageFrom: [
'apps/**/src/**/*.ts',
'libs/**/src/**/*.ts',
'!apps/**/*-e2e/**/*.ts',
'!apps/**/src/**/*module.ts',
'!libs/**/src/**/*module.ts',
'!apps/**/src/environments/*.ts',
'!apps/**/src/main.ts',
'!apps/**/src/polyfills.ts'
],
coverageThreshold: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: -20
}
}
};