jest.config.cjs 427 B

1234567891011121314151617181920
  1. /** @type {import('ts-jest').JestConfigWithTsJest} */
  2. module.exports = {
  3. preset: "ts-jest",
  4. testEnvironment: "node",
  5. maxWorkers: 1,
  6. extensionsToTreatAsEsm: [".ts"],
  7. moduleNameMapper: {
  8. "^(\\.{1,2}/.*)\\.js$": "$1"
  9. },
  10. transform: {
  11. // '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
  12. // '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
  13. "^.+\\.tsx?$": [
  14. "ts-jest",
  15. {
  16. useESM: true
  17. }
  18. ]
  19. }
  20. };