forked from intershop/intershop-pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (30 loc) · 832 Bytes
/
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
const esModules = [
'jest-test',
'@ngrx',
'ngx-bootstrap',
'@angular/common/locales',
'lodash-es/.*',
'@ngx-utils/cookies',
];
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: '<rootDir>/tsconfig.spec.json',
},
__TRANSFORM_HTML__: true,
},
preset: 'jest-preset-angular',
roots: ['src'],
setupFilesAfterEnv: ['<rootDir>/src/setupJest.ts'],
transformIgnorePatterns: [`node_modules/(?!${esModules.join('|')})`],
moduleNameMapper: {
'^ish-(.*)$': '<rootDir>/src/app/$1',
'^ngrx-router$': '<rootDir>/src/ngrx-router',
},
snapshotSerializers: [
'./src/jest-serializer/AngularHTMLSerializer.js',
'./src/jest-serializer/CategoryTreeSerializer.js',
'./src/jest-serializer/NgrxActionSerializer.js',
'./src/jest-serializer/NgrxActionArraySerializer.js',
],
};