-
-
Notifications
You must be signed in to change notification settings - Fork 544
/
jest.config.js
36 lines (34 loc) · 996 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
/* eslint-disable @typescript-eslint/no-var-requires */
const tsconfig = require('tsconfig-extends');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const compilerOptions = tsconfig.load_file_sync('./tsconfig.jest.json', __dirname);
module.exports = {
testEnvironment: 'node',
setupFilesAfterEnv: ['jest-extended/all'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/packages/',
}),
moduleFileExtensions: ['ts', 'js'],
testRegex: '\\.spec.ts$',
rootDir: '.',
transform: {
'^.+\\.ts$': 'ts-jest',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.jest.json',
},
},
coverageReporters: ['json', 'lcov', 'text-summary'],
coverageDirectory: 'coverage',
collectCoverageFrom: [
'packages/**/*.ts',
'!packages/**/*.d.ts',
'!packages/**/index.ts',
'!packages/**/*.interface.ts',
'!**/node_modules/**',
'!**/__stubs__/**',
'!**/__fixture__/**',
'!integration/*',
],
};