-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathjest.config.js
36 lines (33 loc) · 864 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
35
36
const { transformTsPaths } = require('ts-paths-transform');
const {
compilerOptions: { paths: tsconfigPaths },
} = require('./tsconfig');
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
moduleNameMapper: transformTsPaths(tsconfigPaths, {
prefix: '<RootDir>/../../',
debug: true,
}),
logHeapUsage: true,
roots: ['<rootDir>/apps/', '<rootDir>/libs/'],
testMatch: ['**/?(*.)+(spec|test|e2e).+(ts)'],
transform: {
'^.+\\.(ts)$': '@swc/jest',
},
coverageDirectory: './coverage',
collectCoverageFrom: ['<rootDir>/**/*.ts'],
coveragePathIgnorePatterns: [
'/node_modules/',
'\\.d.ts',
'main.ts',
'.entity.ts',
'index.ts',
'.module.ts',
'database.client.ts',
'.dto.ts',
'.type.ts',
'prisma/',
],
setupFiles: ['dotenv-flow/config'],
testEnvironment: 'node',
};