-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
47 lines (47 loc) · 1.43 KB
/
jest.config.js
File metadata and controls
47 lines (47 loc) · 1.43 KB
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
43
44
45
46
47
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: './src/tsconfig.spec.json',
},
__TRANSFORM_HTML__: true,
},
testMatch: ['**/__tests__/**/*.+(ts|js)?(x)', '**/+(*.)+(spec|test).+(ts|js)?(x)'],
setupTestFrameworkScriptFile: '<rootDir>/node_modules/@angular-builders/jest/src/jest-config/setup.js',
transform: {
'^.+\\.(ts|html)$': '<rootDir>/node_modules/jest-preset-angular/preprocessor.js'
},
transformIgnorePatterns: ['node_modules/(?!@ngrx)'],
moduleDirectories: [
"node_modules",
"src/app",
],
collectCoverageFrom: [
'src/app/module/**/*.{ts}',
'!src/app/*.{ts}',
'!src/app/**/*.{js}',
'!src/app/environment/*.{ts}',
'!src/app/language/*.{ts}',
'!src/app/**/*.module.{ts}',
'!src/app/**/*.interface.{ts}',
'!src/app/**/*.state.{ts}',
'!src/app/**/*.entity.{ts}'
],
moduleFileExtensions: [
'ts',
'tsx',
'json',
'js'
],
testResultsProcessor: 'jest-sonar-reporter',
moduleNameMapper: {
"app/(.*)": "<rootDir>/src/app/$1",
"@common/(.*)": "<rootDir>/src/app/common/$1",
"@shared/(.*)": "<rootDir>/src/app/shared/$1",
"@core/(.*)": "<rootDir>/src/app/core/$1",
"@services/(.*)": "<rootDir>/src/app/services/$1",
"@components/(.*)": "<rootDir>/src/app/components/$1",
"@layout/(.*)": "<rootDir>/src/app/layout/$1",
"@testing/(.*)": "<rootDir>/src/testing/$1",
"@env/(.*)": "<rootDir>/src/environments/$1"
}
};