-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (30 loc) · 1.13 KB
/
jest.config.js
File metadata and controls
30 lines (30 loc) · 1.13 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
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src"],
testMatch: ["**/*.test.ts"],
testPathIgnorePatterns: ["/node_modules/", "/src/test/integration/"],
transform: {
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "tsconfig.json" }],
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
setupFilesAfterEnv: ["<rootDir>/src/test/setup.ts"],
reporters: ["default", ["summary", { summaryThreshold: 1 }]],
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/test/**",
"!**/node_modules/**",
],
coverageDirectory: "coverage",
moduleNameMapper: {
"^vscode$": "<rootDir>/src/test/mock/vscode.ts",
"^@lib$": "<rootDir>/src/test/mock/lib.ts",
"^node-fetch$": "<rootDir>/src/test/mock/node-fetch.ts",
// Development: use local TypeScript source (same as webpack and tsconfig)
// "^@altimateai/dbt-integration$":
// "<rootDir>/../altimate-dbt-integration/src/index.ts",
// Production: use npm package (commented out for development)
"^@altimateai/dbt-integration$": "@altimateai/dbt-integration",
"^@extension$": "<rootDir>/src/modules.ts",
},
};