-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
33 lines (32 loc) · 918 Bytes
/
jest.config.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
import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
verbose: true,
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
roots: ['<rootDir>/src/', '<rootDir>/test/'],
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': '@swc/jest',
},
collectCoverageFrom: ['<rootDir>/src/**/*.(t|j)s'],
coveragePathIgnorePatterns: [
'.*.controller.ts',
'.*.module.ts',
'.*.entity.ts',
'.*.dto.ts',
'.*.spec.ts',
'.*.module-definition.ts',
'.*.configuration.ts',
'.*.configuration.model.ts',
'.*./main.ts',
'node_modules',
],
coverageDirectory: './coverage',
testEnvironment: 'node',
moduleNameMapper: {
'@app/(.*)': '<rootDir>/src/$1',
},
setupFiles: ['<rootDir>/jest-setup-file.ts'],
};
export default config;