-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
67 lines (67 loc) · 1.54 KB
/
jest.config.js
File metadata and controls
67 lines (67 loc) · 1.54 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
rootDir: __dirname,
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src", "<rootDir>/test"],
testMatch: [
"**/__tests__/**/*.+(ts|tsx|js)",
"**/?(*.)+(spec|test).+(ts|tsx|js)",
],
transform: {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
},
],
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
collectCoverage: true,
coverageDirectory: "coverage",
coverageReporters: [
"text",
"text-summary",
"lcov",
"html",
"json",
"json-summary",
"cobertura",
],
collectCoverageFrom: [
"src/**/*.{js,ts}",
"!src/**/*.d.ts",
"!src/**/*.test.{js,ts}",
"!src/**/__tests__/**",
"!src/cli/**",
"!src/utilities/**",
],
coveragePathIgnorePatterns: ["/node_modules/", "/dist/", "/__tests__/"],
coverageThreshold: {
global: {
branches: 58,
functions: 51,
lines: 73,
statements: 72,
},
// Per-file thresholds for critical components
"src/core/": {
branches: 80,
functions: 88,
lines: 88,
statements: 88,
},
"src/processors/dotProcessor.ts": {
branches: 70,
functions: 80,
lines: 80,
statements: 80,
},
},
// Enable module resolution for both src and dist
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
// Ensure Jest can find modules
moduleDirectories: ["node_modules", "<rootDir>/src", "<rootDir>/dist"],
};