-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.unit.js
38 lines (38 loc) · 1012 Bytes
/
jest.config.unit.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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
preset: "ts-jest",
clearMocks: true,
collectCoverage: true,
silent: false,
verbose: false,
coverageDirectory: "coverage",
collectCoverageFrom: ["src/**/*.ts"],
modulePathIgnorePatterns: [
"<rootDir>/cypress",
"<rootDir>/src/components", // Ignoring visual components
"<rootDir>/src/pages", // Ignoring visual components
],
moduleNameMapper: {
"\\.svg": "<rootDir>/test/fixtures/fileMock.ts",
},
globals: {
Uint8Array,
"ts-jest": {
tsconfig: "tsconfig.test.unit.json",
},
},
coverageThreshold: {
// TODO CM-1722 re-raise these to (at-least) previous values: 80.07 | 66.66 | 72 | 78.45
global: {
statements: 88,
branches: 77,
functions: 78,
lines: 88,
},
},
setupFiles: ["jest-localstorage-mock"],
testEnvironment: "./test/custom-env.cjs",
};