forked from microsoft/azure-devops-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
49 lines (38 loc) · 1.1 KB
/
jest.config.cjs
File metadata and controls
49 lines (38 loc) · 1.1 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
module.exports = {
// Use ts-jest preset for TypeScript support
preset: "ts-jest",
// Specify the test environment (node for backend projects)
testEnvironment: "node",
// Root directory for test files
roots: ["<rootDir>/test"],
// Glob patterns for test files
testMatch: ["**/?(*.)+(spec|test).[jt]s?(x)"],
// Automatically clear mock calls and instances between every test
clearMocks: true,
// Collect code coverage information
collectCoverage: true,
// Output directory for coverage reports
coverageDirectory: "coverage",
// Coverage report formats
coverageReporters: ["text", "lcov", "json-summary"],
// Coverage thresholds
coverageThreshold: {
global: {
branches: 40,
functions: 40,
lines: 40,
statements: 40,
},
},
// Module file extensions for importing
moduleFileExtensions: ["ts", "js"],
// Transform settings for ts-jest
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
moduleNameMapper: {
"^(.+)/version\\.js$": "$1/version.ts",
"^(.+)/utils\\.js$": "$1/utils.ts",
"^(.+)/auth\\.js$": "$1/auth.ts",
},
};