-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.ts
39 lines (37 loc) · 880 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
31
32
33
34
35
36
37
38
39
import { InitialOptionsTsJest } from 'ts-jest/dist/types'
import { pathsToModuleNameMapper } from 'ts-jest/utils'
import { compilerOptions } from './tsconfig.json'
const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/src'
})
export default {
roots: ['<rootDir>/src'],
preset: 'ts-jest',
transform: {
'.+\\.ts$': 'ts-jest'
},
collectCoverageFrom: ['**/*.ts'],
coveragePathIgnorePatterns: [
'/node_modules',
'/constants',
'.fixture.ts',
'.command.ts',
'.module.ts',
'.event.ts',
'.dto.ts',
'.args.ts',
'.query.ts',
'.error.ts',
'index.ts',
'.resolver.ts',
'test',
'main.ts',
'.type.ts',
'.model.ts'
],
testEnvironment: 'node',
detectOpenHandles: true,
coverageDirectory: './coverage',
clearMocks: true,
moduleNameMapper
} as InitialOptionsTsJest