forked from FIAP-Tech-Challenge-53/fiap-irango-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (30 loc) · 888 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
const { pathsToModuleNameMapper } = require('ts-jest')
const { compilerOptions } = require('./tsconfig')
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleDirectories: ['src', 'node_modules', 'test'],
moduleFileExtensions: ['js', 'json', 'ts'],
testRegex: '.spec.ts$',
roots: ['<rootDir>'],
modulePaths: [compilerOptions.baseUrl], // <-- This will be set to 'baseUrl' value
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths /*, { prefix: '<rootDir>/' } */),
modulePathIgnorePatterns: ["<rootDir>/dist/"],
coverageDirectory: 'coverage',
setupFilesAfterEnv: ['<rootDir>/test/jest.resets.ts'],
transform: {
'^.+\\.(t|j)s$': [
'ts-jest', {
tsconfig: './tsconfig.json'
}
]
},
coverageThreshold: {
global: {
branches: 25,
functions: 30,
lines: 30,
statements: 30
}
},
}