/** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { preset: "ts-jest/presets/default-esm", globalSetup: "./jest.global-setup.js", globalTeardown: "./jest.global-teardown.js", testEnvironment: "node", testTimeout: 120000, extensionsToTreatAsEsm: [".ts"], testPathIgnorePatterns: ["/node_modules/", "/dist/", "/target/"], moduleNameMapper: { "^(\\.{1,2}/.*)\\.js$": "$1", "#ansi-styles": "ansi-styles/index.js", "#supports-color": "supports-color/index.js", }, transform: { // '^.+\\.[tj]sx?$' to process js/ts with `ts-jest` // '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest` "^.+\\.tsx?$": [ "ts-jest", { useESM: true, }, ], }, }