-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
42 lines (41 loc) · 1.26 KB
/
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
34
35
36
37
38
39
40
41
42
import { compilerOptions } from './tsconfig.json';
import { pathsToModuleNameMapper } from 'ts-jest';
export default {
preset: 'ts-jest',
testEnvironment: 'node',
testEnvironmentOptions: {
NODE_ENV: 'test',
},
testTimeout: 60000,
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
modulePaths: ['<rootDir>'],
testMatch: ['**/__test__/**/*.test.ts'],
collectCoverage: true,
coverageDirectory: './coverage',
collectCoverageFrom: ['src/**/*.{js,ts}'],
coveragePathIgnorePatterns: [
'node_modules',
'prisma',
'public',
'logs',
'__test__',
'src/config',
'src/app.ts',
'src/server',
'middlewares/http_error_handler',
'src/middlewares/rate_limiter',
'presenters/users/delete_me_presenter.ts',
'presenters/users_auth/forgot_password_request_presenter.ts',
'presenters/users_auth/forgot_password_reset_presenter.ts',
'services/users/logical_delete_user_service.ts',
'utils/http_messages',
'utils/nodemailer/',
],
coverageThreshold: {
global: {
lines: 80,
},
},
coverageReporters: ['json-summary', 'text', 'lcov', 'clover', 'html'],
transform: {},
};