-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
43 lines (40 loc) · 1.08 KB
/
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
37
38
39
40
41
42
43
'use strict';
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { defaults: tsJest } = require('ts-jest/presets');
/**
* @type {import('./tsconfig.json')}
*/
const { compilerOptions } = require('./tsconfig.json');
/** @typedef {import('ts-jest')} */
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
testTimeout: 15000,
moduleDirectories: ['node_modules', '<rootDir>'],
verbose: true,
collectCoverage: true,
setupFiles: ['dotenv/config'],
setupFilesAfterEnv: ['<rootDir>/test/test.setup.ts'],
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/index.ts',
'!**/node_modules/**',
'!**/vendor/**',
'!**/dist/**',
],
// coverageThreshold: {
// global: {
// branches: 75,
// functions: 75,
// lines: 75,
// statements: 75,
// },
// },
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
testPathIgnorePatterns: ['<rootDir>/node_modules', '<rootDir>/dist'],
transform: tsJest.transform,
globals: {
'ts-jest': {},
},
};