-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (35 loc) · 1007 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
32
33
34
35
module.exports = {
preset: 'jest-preset-angular',
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest',
},
testPathIgnorePatterns: ['/node_modules/', '/plugins/'],
transformIgnorePatterns: ['node_modules/(?!@ionic-native)'],
moduleFileExtensions: ['ts', 'js', 'html'],
moduleNameMapper: {
'^@app/(.*)$': '<rootDir>/src/app/$1',
'^@env/(.*)$': '<rootDir>/src/environments/$1',
'^@test/(.*)$': '<rootDir>/test/$1',
},
collectCoverageFrom: [
'src/app/**/*.{ts,tsx}',
'!**/index.{ts,tsx}',
'!**/*.mock.{ts,tsx}',
'!**/*.module.{ts,tsx}',
'!**/*.spec.{ts,tsx}',
],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
stringifyContentPathRegex: '\\.html$',
astTransformers: {
before: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer',
],
},
},
},
setupFilesAfterEnv: ['./src/test-setup.ts'],
};