-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
29 lines (28 loc) · 986 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
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
globalSetup: 'jest-preset-angular/global-setup',
preset: 'jest-preset-angular',
testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)?(x)'],
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
modulePaths: ['<rootDir>'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, { prefix: '<rootDir>' }),
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
collectCoverage: true,
coverageReporters: ['lcov', 'html'],
coverageDirectory: 'coverage',
collectCoverageFrom: ['src/services/workflow-worker/**/*.{ts,js}'],
coveragePathIgnorePatterns: ['<rootDir>/build/', '<rootDir>/node_modules/', '<rootDir>/src/generated/'],
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'test',
outputName: 'jest-junit-report.xml',
},
],
],
};