-
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) · 806 Bytes
/
Copy pathjest.config.js
File metadata and controls
23 lines (22 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests/specs'],
testRegex: '(/__test__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
verbose: true,
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'tests/coverage/',
collectCoverageFrom: ['<rootDir>/src/**/*.{js,ts,tsx}', '!src/app.ts', '!src/@types/**/*'],
moduleNameMapper: {
'@src/(.*)$': '<rootDir>/src/$1',
'@tests/(.*)$': '<rootDir>/tests/$1',
},
transform: {
'\\.[jt]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tests/tsconfig.json' }],
},
setupFiles: ['dotenv/config', '<rootDir>/tests/setup/env-vars.ts'],
setupFilesAfterEnv: ['reflect-metadata'],
};