-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.ts
43 lines (41 loc) · 1.22 KB
/
jest.config.ts
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
/* eslint-disable */
import type { Config } from 'jest'
const config: Config = {
displayName: 'onecx-bookmark-ui',
verbose: false,
preset: './jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
testMatch: ['<rootDir>/src/app/**/*.spec.ts'],
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$'
}
]
},
transformIgnorePatterns: ['node_modules/(?!@ngrx|(?!deck.gl)|d3-scale|(?!.*.mjs$))'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment'
],
collectCoverage: true,
coverageDirectory: '<rootDir>/reports/coverage/',
coveragePathIgnorePatterns: ['src/app/shared/generated'],
coverageReporters: ['json', 'lcov', 'text', 'text-summary', 'html'],
testResultsProcessor: 'jest-sonar-reporter',
reporters: [
'default',
[
'jest-sonar',
{
outputDirectory: './reports',
outputName: 'sonarqube_report.xml',
reportedFilePath: 'absolute'
}
]
]
}
export default config