-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
29 lines (27 loc) · 740 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
import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
clearMocks: true,
collectCoverage: false,
// When set to true, coverage is performed even if coverage flag isn't provided
collectCoverageFrom: ['src/**/*.ts', '!src/index.ts'],
coverageDirectory: 'coverage',
coverageReporters: ['json', 'lcov', 'text', 'text-summary'],
coverageThreshold: {
global: {
branches: 40,
functions: 60,
lines: 60,
statements: 60,
},
},
maxWorkers: 1,
preset: 'ts-jest',
roots: ['.'],
snapshotFormat: {
printBasicPrototype: false,
},
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|test).[jt]s'],
testPathIgnorePatterns: ['dist'],
};
export default config;