generated from rootstrap/node-ts-api-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
23 lines (22 loc) · 716 Bytes
/
jest.config.js
File metadata and controls
23 lines (22 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: [
'<rootDir>/__tests__/utils/callbacks.ts',
'<rootDir>/__tests__/utils/setup.ts'
],
// necessary for resolving the paths in tsconfig:
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/'
}),
testRegex: '/__tests__/.*.spec.(js|ts|tsx)?$',
testResultsProcessor: 'jest-sonar-reporter',
coveragePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/src/database/migrations/',
'<rootDir>/src/swagger.ts',
'<rootDir>/__tests__/'
]
};