-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
40 lines (34 loc) · 871 Bytes
/
jest.config.js
File metadata and controls
40 lines (34 loc) · 871 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
export default {
// Use ts-jest preset for TypeScript support
preset: "ts-jest",
testEnvironment: "node",
// Test discovery
roots: ["<rootDir>/tests"],
testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"],
// TypeScript transformation
transform: {
"^.+\\.ts$": "ts-jest",
},
moduleFileExtensions: ["ts", "js", "json"],
// Module resolution
transformIgnorePatterns: [
"node_modules/(?!(google-spreadsheet|ky|@sindresorhus)/)",
],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
// Test setup and environment
setupFilesAfterEnv: ["<rootDir>/tests/setup.ts"],
testEnvironmentOptions: {
NODE_ENV: "test",
},
// Coverage configuration
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/*.test.ts",
"!src/**/*.spec.ts",
],
coverageDirectory: "coverage",
// Output
verbose: true,
};