-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (25 loc) · 953 Bytes
/
jest.config.js
File metadata and controls
27 lines (25 loc) · 953 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
const { createDefaultPreset } = require("ts-jest");
const tsJestTransformCfg = createDefaultPreset().transform;
/** @type {import("jest").Config} **/
module.exports = {
testEnvironment: "node",
testPathIgnorePatterns: [
"/node_modules/",
"\\.e2e\\.test\\.[jt]sx?$",
"MockLedgerTransport\\.ts$",
// Jest matches **/__tests__/**/*.ts — exclude helpers and mocks
"[/\\\\]__tests__[/\\\\]__mocks__[/\\\\]",
"[/\\\\]__tests__[/\\\\]setup\\.ts$",
],
transform: {
...tsJestTransformCfg,
},
moduleNameMapper: {
"^@galaxy/core-oracles$": "<rootDir>/packages/core/oracles/src/index.ts",
"^@galaxy-kj/core-oracles$": "<rootDir>/packages/core/oracles/src/index.ts",
"^chalk$": "<rootDir>/tools/cli/__tests__/__mocks__/chalk.ts",
"^ora$": "<rootDir>/tools/cli/__tests__/__mocks__/ora.ts",
// Resolve relative .js imports to .ts (ESM-style imports in tools/cli)
"^(\\.\\.?/.*)\\.js$": "$1",
},
};