-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
23 lines (23 loc) · 867 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
// https://github.com/thymikee/jest-preset-angular#brief-explanation-of-config
module.exports = {
preset: 'jest-preset-angular',
roots: ['src'],
coverageDirectory: 'reports',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
moduleNameMapper: {
'@app/(.*)': '<rootDir>/src/app/$1',
'@core': ['<rootDir>/src/app/@core'],
'@core/(.*)': ['<rootDir>/src/app/@core/$1'],
'@shared': ['<rootDir>/src/app/@shared'],
'@shared/(.*)': ['<rootDir>/src/app/@shared/$1'],
'@env': '<rootDir>/src/environments/environment'
},
globals: {
'ts-jest': {
allowSyntheticDefaultImports: true,
tsConfig: '<rootDir>/tsconfig.spec.json'
},
},
// Do not ignore librairies such as ionic, ionic-native or bootstrap to transform them during unit testing.
transformIgnorePatterns: ['node_modules/(?!(jest-test|@ng-bootstrap))']
};