-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjest.config.debug.js
More file actions
33 lines (30 loc) · 954 Bytes
/
jest.config.debug.js
File metadata and controls
33 lines (30 loc) · 954 Bytes
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 } = require('ts-jest');
const { paths } = require('./tsconfig.json').compilerOptions;
process.env.TZ = 'UTC'; // Tests should always run in UTC, no time zone dependencies
// eslint-disable-next-line no-undef
globalThis.ngJest = {
skipNgcc: true,
tsconfig: 'tsconfig.spec.json',
};
module.exports = {
rootDir: '.',
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
transform: {
'^.+\\.(ts|js|html|svg)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
testMatch: ['<rootDir>/(src|projects)/**/+(*.)+(spec|test).ts'],
watchPathIgnorePatterns: ['test-results'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'^lodash-es$': 'lodash',
'^uuid$': 'uuid',
...pathsToModuleNameMapper(paths, { prefix: '<rootDir>' }),
},
};