-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (37 loc) · 902 Bytes
/
jest.config.js
File metadata and controls
37 lines (37 loc) · 902 Bytes
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
export default {
testEnvironment: "node",
roots: ["<rootDir>/src", "<rootDir>/tests"],
testMatch: ["**/*.test.ts"],
transform: {
"^.+\\.ts$": [
"@swc/jest",
{
jsc: {
parser: { syntax: "typescript", decorators: true },
target: "es2022",
},
module: { type: "commonjs" },
},
],
},
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^@toon-format/toon$": "<rootDir>/tests/__mocks__/@toon-format/toon.ts",
},
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/*.d.ts",
"!src/**/*.test.ts",
"!src/ApexLogParser.ts", // Exclude the log parser as it will be getting tested independently
],
coverageDirectory: "coverage",
coverageReporters: ["text", "lcov", "html"],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};