-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
45 lines (45 loc) · 1.32 KB
/
Copy pathjest.config.js
File metadata and controls
45 lines (45 loc) · 1.32 KB
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
41
42
43
44
45
/** @type {import('jest').Config} */
export default {
preset: "ts-jest/presets/default-esm",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transform: {
"^.+\\.ts$": [
"ts-jest",
{
useESM: true,
tsconfig: {
module: "ESNext",
moduleResolution: "bundler",
},
},
],
},
testMatch: ["**/tests/**/*.test.ts"],
// tests/live/ are opt-in (real API calls, cost money). Run them with
// `npm run test:live`, which sets JEST_LIVE=1 and overrides this ignore.
testPathIgnorePatterns: process.env.JEST_LIVE
? ["/node_modules/"]
: ["/node_modules/", "/tests/live/"],
collectCoverageFrom: [
"src/**/*.ts",
// Composition root: commander wiring + env-var glue. Behaviour is
// exercised end-to-end (tests/e2e/full-analysis.test.ts via the same
// pipeline functions) and on its error edges (tests/e2e/cli-errors.test.ts);
// we do not double-count line coverage at the wiring layer.
"!src/main/index.ts",
"!src/main/run-analyze.ts",
],
coverageThreshold: {
global: {
lines: 97,
functions: 94, // 4 LangGraph annotation reducer closures are framework-internal
branches: 92,
statements: 97,
},
},
};