diff --git a/assets/jest.config.js b/assets/jest.config.js index 192b61fd..32c0a334 100644 --- a/assets/jest.config.js +++ b/assets/jest.config.js @@ -30,12 +30,13 @@ export default { moduleNameMapper: { './js/(.*)': '/js/$1', }, - transform: {}, - globals: { - extensionsToTreatAsEsm: ['.ts', '.js'], - 'ts-jest': { + transform: { + '^.+\\.tsx?$': ['ts-jest', { tsconfig: '/tsconfig.json', useESM: true, - }, + }] }, + globals: { + extensionsToTreatAsEsm: ['.ts', '.js'], + } };