-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
40 lines (38 loc) · 958 Bytes
/
jest.config.ts
File metadata and controls
40 lines (38 loc) · 958 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
38
39
40
import type { Config } from "jest";
const config: Config = {
testEnvironment: "node",
clearMocks: true,
resetMocks: true,
restoreMocks: true,
testMatch: [
"<rootDir>/test/**/*.test.ts",
"<rootDir>/test/**/*.spec.ts",
"<rootDir>/src/**/*.test.ts",
],
transform: {
"^.+\\.ts$": ["ts-jest", { tsconfig: "tsconfig.json" }],
},
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/*.d.ts",
"!src/**/index.ts",
"!src/**/*.test.ts",
"!src/**/*.spec.ts",
// Exclude infrastructure adapters (thin wrappers around external SDKs)
"!src/infra/senders/**/*.sender.ts",
"!src/infra/repositories/**/*.repository.ts",
],
coverageDirectory: "coverage",
coverageReporters: ["text", "lcov", "html", "json-summary"],
coverageThreshold: {
global: {
branches: 64,
functions: 70,
lines: 75,
statements: 75,
},
},
verbose: true,
maxWorkers: "50%",
};
export default config;