-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
22 lines (21 loc) · 772 Bytes
/
jest.config.js
File metadata and controls
22 lines (21 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const DEBUG_MODE =
process.argv.includes('--runInBand') || process.argv.includes('-t');
const DEBUG_CONFIG = ['<rootDir>/src/test.ts'];
/**
* Jest configuration file, see link for more information:
* https://jestjs.io/docs/en/configuration
*
* @type { import("@jest/types").Config.InitialOptions }
*/
module.exports = {
roots: ['<rootDir>/src'],
preset: 'jest-preset-angular',
setupFilesAfterEnv: DEBUG_MODE ? DEBUG_CONFIG : [],
globalSetup: 'jest-preset-angular/global-setup',
testMatch: ['<rootDir>/src/app/**/*.spec.ts'],
moduleNameMapper: { '@api/(.*)': '<rootDir>/build/@api/$1' },
collectCoverage: true,
coverageReporters: ['json', 'lcov', 'text-summary'],
coverageDirectory: 'build/coverage',
collectCoverageFrom: ['src/app/**/*.ts']
};