-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
38 lines (37 loc) · 992 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
36
37
38
/** @type {import('@jest/types').Config.InitialOptions} */
const requireJSON = require('require-strip-json-comments');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = requireJSON('./tsconfig.json');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/src/',
}),
coveragePathIgnorePatterns: ['/dist/'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
diagnostics: true,
},
},
forceExit: true,
verbose: true,
setupFilesAfterEnv: ['jest-expect-message'],
collectCoverage: true,
coverageDirectory: './reports/coverage',
reporters: [
'default',
[
'jest-html-reporter',
{
pageTitle: 'Test Report',
outputPath: './reports/test/index.html',
},
],
[
'jest-junit',
{ outputDirectory: './reports/junit', outputName: 'results.xml' },
],
],
};