This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
forked from hypertrace/hypertrace-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
55 lines (54 loc) · 1.91 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
process.env.TZ = 'UTC'; // Tests should always run in UTC, no time zone dependencies
module.exports = {
rootDir: '.',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.html$',
astTransformers: {
before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer']
}
}
},
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'test-results/hypertrace-ui'
}
],
[
'jest-html-reporter',
{
outputPath: 'test-results/hypertrace-ui/test-report.html'
}
]
],
watchPathIgnorePatterns: ['test-results'],
collectCoverageFrom: [
'src/**/*.ts',
'projects/!(test-utils)/src/**/*.ts',
'!**/*.d.ts',
'!src/main.ts',
'!src/environments/**',
'!**/*/test/**',
'!src/app/routes/**/*.ts'
],
coverageDirectory: 'coverage/hypertrace-ui',
modulePathIgnorePatterns: ['<rootDir>/dist/'], // Need to reset from app project, but empty is merged
testMatch: ['<rootDir>/(src|projects)/**/+(*.)+(spec|test).ts'],
moduleNameMapper: {
'^lodash-es$': 'lodash',
'@hypertrace/assets-library': '<rootDir>/projects/assets-library/src/public-api.ts',
'@hypertrace/common$': '<rootDir>/projects/common/src/public-api.ts',
'@hypertrace/components': '<rootDir>/projects/components/src/public-api.ts',
'@hypertrace/dashboards$': '<rootDir>/projects/dashboards/src/public-api.ts',
'@hypertrace/dashboards/testing': '<rootDir>/projects/dashboards/src/test/public-api.ts',
'@hypertrace/test-utils': '<rootDir>/projects/test-utils/src/public-api.ts',
'@hypertrace/graphql-client': '<rootDir>/projects/graphql-client/src/public-api.ts',
'@hypertrace/observability': '<rootDir>/projects/observability/src/public-api.ts'
}
};