-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
34 lines (21 loc) · 878 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
const { pathsToModuleNameMapper } = require('ts-jest')
const { compilerOptions } = require('./tsconfig.json')
module.exports = {
bail: true,
clearMocks: true,
collectCoverageFrom: [
'<rootDir>/src/modules/**/useCases/**/**/*.ts',
'!<rootDir>/src/modules/**/useCases/**/**/*.controller.ts',
'<rootDir>/src/shared/middlewares/**/useCases/**/*.ts',
'!<rootDir>/src/shared/middlewares/**/useCases/**/*.controller.ts',
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/src/' }),
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*.spec.ts'],
testPathIgnorePatterns: ['/node_modules/', '/src/shared/utils/'],
collectCoverage: true,
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['/node_modules/'],
coverageReporters: ['text-summary', 'lcov']
}