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