forked from eosdac/eosdac-api
-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.unit.ts
38 lines (36 loc) · 988 Bytes
/
jest.config.unit.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
/* eslint-disable @typescript-eslint/no-var-requires */
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');
import config from './jest.config';
export default {
...config,
verbose: true,
preset: 'ts-jest',
testEnvironment: 'jest-environment-node',
testMatch: ['**/__tests__/**/*.test.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
collectCoverageFrom: [
'src/**/*.ts',
'!**/use-case.ts',
'!**/route.ts',
'!**/*.fixture.ts',
'!**/*.mock.ts',
'!**/*.error.ts',
'!**/__tests__/**',
'!**/__mocks__/**',
'!**/schemas/**',
'!src/**/index.ts',
'!src/**/*.repository.ts',
'!src/**/*.service.ts',
'!src/**/*.enums.ts',
'!src/**/*.dto.ts',
'!src/**/*.types.ts',
'!src/**/*.route.ts',
'!src/**/*ioc.ts',
'!src/**/*ioc.config.ts',
'!src/api-handlers/**/*',
'!src/**/*.interface.ts',
],
};