-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
50 lines (49 loc) · 1003 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const { defaults } = require('jest-config');
module.exports = {
...defaults,
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.ts?$': 'babel-jest',
'^.spec.ts?$': 'babel-jest',
},
testMatch: [
'**/*.spec.ts',
],
automock: false,
// bail: 1,
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
'**/*.ts',
],
coverageDirectory: './coverage/',
coveragePathIgnorePatterns: [
'/node_modules/',
],
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95,
},
},
errorOnDeprecated: true,
moduleFileExtensions: ['ts', 'js', 'json'],
restoreMocks: true,
setupFilesAfterEnv: [
'./jest.ts',
],
testPathIgnorePatterns: [
'/node_modules/',
'./jserver/',
'./.metadata',
],
globals: {
'ts-jest': {
tsConfig: './tsconfig.json',
},
},
verbose: false, // default is false, included it to switch to true for easy debugging
};