-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
23 lines (22 loc) · 845 Bytes
/
jest.config.js
File metadata and controls
23 lines (22 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require('jest-preset-angular/ngcc-jest-processor');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
// In the following statement, replace `./tsconfig` with the path to your `tsconfig` file
// which contains the path mapping (ie the `compilerOptions.paths` option):
const { compilerOptions } = require('./tsconfig.json');
module.exports = {
preset: 'jest-preset-angular',
roots: ['src'],
coverageDirectory: 'reports',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
globals: {
'ts-jest': {
allowSyntheticDefaultImports: true,
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: {
ignoreCodes: ['TS151001'],
}
},
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)']
};