-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
36 lines (26 loc) · 1.15 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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
export default {
preset: 'ts-jest/presets/js-with-ts',
// Automatically clear mock calls and instances between every test
clearMocks: true,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
collectCoverageFrom: ['<rootDir>/src/**/*.ts', '!<rootDir>/src/**/interface/**', '!<rootDir>/src/**/enum/**', '!<rootDir>/src/**/model/**'],
// Indicates which provider should be used to instrument code for coverage
coverageProvider: 'v8',
// The paths to modules that run some code to configure or set up the testing environment before each test
setupFiles: ['<rootDir>/jest.setup.ts'],
// The number of seconds after which a test is considered as slow and reported as such in the results.
slowTestThreshold: 100,
// The test environment that will be used for testing
testEnvironment: 'node',
testMatch: ['<rootDir>/test/**/*.spec.ts'],
globals: {
'ts-jest': {
isolatedModules: true,
},
},
};