generated from dvsa/cvs-svc-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
40 lines (38 loc) · 988 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
34
35
36
37
38
39
40
import type { Config } from '@jest/types';
import { defaults } from 'jest-config';
// https://jestjs.io/docs/en/configuration.html
const config: Config.InitialOptions = {
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'js'],
// overrides
// https://kulshekhar.github.io/ts-jest/docs/options
preset: 'ts-jest',
verbose: true,
testEnvironment: 'node',
testMatch: [
'**/__tests__/**/*.[jt]s?(x)',
//TODO Add for integration
'**/?(*.)+(spec|test).[tj]s?(x)',
],
collectCoverage: false,
collectCoverageFrom: ['src/**/*.{js,ts}', '!**/node_modules/**'],
//TODO Add for integration
coverageDirectory: 'coverage/unit',
coveragePathIgnorePatterns: [
'/node_modules/',
'/coverage/',
'/.webpack/',
'/.build/',
'/.serverless/',
'/reports/',
'/.artifact/',
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};
export default config;