-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
49 lines (46 loc) · 1.14 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
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
//rootDir: '.',
setupFilesAfterEnv: [
'<rootDir>/src/setup-jest.ts'
],
globals: {
'ts-jest': {
tsConfig: './tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)?$',
astTransformers: [
require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer')
]
}
},
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!angular2-toaster)'
],
transform: {
'^.+\\.(ts|js|html|svg)$': 'ts-jest'
},
testMatch: [
'<rootDir>/src/app/**/*.spec.ts'
],
testEnvironment: 'jest-environment-jsdom-thirteen',
moduleFileExtensions: [
//'html',
'js',
'json',
'ts'
],
coveragePathIgnorePatterns: [
'<rootDir>/node_modules/'
],
modulePathIgnorePatterns: [
'dist'
],
preset: 'jest-preset-angular',
snapshotSerializers: [
'jest-preset-angular/AngularSnapshotSerializer.js',
'jest-preset-angular/HTMLCommentSerializer.js'
],
moduleNameMapper: {
'^@app/(.*)':'<rootDir>/src/app/$1',
'^@env/(.*)':'<rootDir>/src/environments/$1'
}
}