| 1 | module.exports = { |
| 2 | roots: ["<rootDir>/test"], |
| 3 | transform: { |
| 4 | "^.+\\.ts?$": [ |
| 5 | "ts-jest", |
| 6 | { |
| 7 | useESM: true, |
| 8 | }, |
| 9 | ], |
| 10 | "^.+\\.js$": [ |
| 11 | "babel-jest", |
| 12 | { |
| 13 | presets: [["@babel/preset-env", { targets: { node: "current" } }]], |
| 14 | }, |
| 15 | ], |
| 16 | }, |
| 17 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", ".d.ts"], |
| 18 | extensionsToTreatAsEsm: [".ts", ".d.ts"], |
| 19 | // Remove or comment out the moduleNameMapper configuration |
| 20 | moduleNameMapper: { |
| 21 | "^(.*)\\.js$": "$1", |
| 22 | }, |
| 23 | }; |