-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (31 loc) · 1.03 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
module.exports = {
rootDir: '.',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.spec.json',
stringifyContentPathRegex: '\\.html?$',
astTransformers: [
require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer'),
],
},
},
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest',
},
testMatch: ['<rootDir>/**/*.spec.ts'],
testEnvironment: 'jest-environment-jsdom-thirteen',
moduleFileExtensions: ['html', 'js', 'json', 'ts'],
coveragePathIgnorePatterns: ['/node_modules/', '/modules/*.*/'],
moduleNameMapper: {
'^@ngrx/(.*)': '<rootDir>/../../modules/$1',
'^@cedu/(.*)': '<rootDir>/src/app/$1',
},
transformIgnorePatterns: ['node_modules/(?!@ngrx)'],
modulePathIgnorePatterns: ['dist'],
preset: 'jest-preset-angular',
snapshotSerializers: [
'jest-preset-angular/AngularSnapshotSerializer.js',
'jest-preset-angular/HTMLCommentSerializer.js',
],
};