-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.ts
35 lines (32 loc) · 1.07 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
const coverageToNumber = 50; // [0..100]
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
export default {
testTimeout: 600 * 1000,
setTimeout: 600 * 1000,
verbose: true,
rootDir: "./",
clearMocks: true, // clear mocks before every test
resetMocks: false, // reset mock state before every test
testMatch: [
// '<rootDir>/src/**/*.spec.ts', // Commenting cache test for github actions
"<rootDir>/src/**/*.test.ts",
"<rootDir>/src/**/*.test.js",
], // match only tests inside /tests folder
testPathIgnorePatterns: ["<rootDir>/node_modules/"], // exclude unnecessary folders
// following lines are about coverage
collectCoverage: true,
collectCoverageFrom: ["<rootDir>/src/**/*.ts", "<rootDir>/src/**/*.js"],
coverageDirectory: "<rootDir>/coverage",
coverageReporters: ["lcov"],
coverageThreshold: {
global: {
branches: coverageToNumber,
functions: coverageToNumber,
lines: coverageToNumber,
statements: coverageToNumber,
},
},
};