-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.app.ts
35 lines (32 loc) · 1.08 KB
/
jest.config.app.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
import type { Config } from '@jest/types';
const esModules = ['@angular', 'tslib', 'rxjs', 'rxpoweredup'];
const CONFIG: Config.InitialOptions = {
displayName: 'app',
preset: './jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/modules/app',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
isolatedModules: true,
},
],
},
maxWorkers: 1,
transformIgnorePatterns: [
`node_modules/(?!.*\\.mjs$|${esModules.join('|')})`
],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
]
};
export default CONFIG;