-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
30 lines (27 loc) · 732 Bytes
/
jest.config.ts
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
import { Config } from 'jest';
import { pathsToModuleNameMapper } from 'ts-jest';
import { compilerOptions } from './tsconfig.json';
const config: Config = {
moduleFileExtensions: ['js', 'json', 'ts'],
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.ts$': 'ts-jest',
},
clearMocks: true,
collectCoverageFrom: ['**/*.ts'],
coverageDirectory: 'coverage',
testEnvironment: 'node',
setupFilesAfterEnv: ['./.jest/env.ts', './.jest/reflect-metadata.ts'],
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
};
export default config;