-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjest.config.js
31 lines (29 loc) · 1.06 KB
/
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
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');
const fileListToExclude = [
'/src/app/.*\\.html$',
'/src/app/.*\\.index\\.ts$',
'/src/app/.*\\.enum\\.ts$',
'/src/app/.*\\.module\\.ts$',
'/src/app/.*\\.actions\\.ts$',
'/src/app/.*\\.template\\.ts$',
];
module.exports = {
preset: 'jest-preset-angular',
roots: ['<rootDir>/src/'],
testMatch: ['**/+(*.)+(spec).+(ts)'],
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
collectCoverage: true,
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
coverageDirectory: 'coverage/cvs-app-vtm',
testPathIgnorePatterns: ['/node_modules/', '/archive/', '/dist/', ...fileListToExclude],
coveragePathIgnorePatterns: ['/src/mocks/', '/src/app/api/', ...fileListToExclude],
testResultsProcessor: 'jest-sonar-reporter',
workerThreads: true,
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: '<rootDir>/',
}),
'@sentry/angular-ivy': '<rootDir>/node_modules/@sentry/angular-ivy/bundles/sentry-angular-ivy.umd.js',
},
};