-
Notifications
You must be signed in to change notification settings - Fork 403
/
jest.config.js
33 lines (31 loc) · 1 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
const { pathsToModuleNameMapper: resolver } = require('ts-jest');
const { compilerOptions } = require('../tsconfig.base');
const CI = process.env['CI'] === 'true';
const moduleNameMapper = resolver(compilerOptions.paths, { prefix: '<rootDir>/../' });
if (!CI) {
console.log('[DEBUG]: moduleNameMapper');
console.log(JSON.stringify(moduleNameMapper, null, 4));
}
module.exports = {
displayName: 'integration',
preset: '../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
globals: {},
moduleNameMapper,
coverageDirectory: '../coverage/integration',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
isolatedModules: true,
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$'
}
]
},
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment'
]
};