diff --git a/src/presets/__snapshots__/create-jest-preset.spec.ts.snap b/src/presets/__snapshots__/create-jest-preset.spec.ts.snap index 527a6e53cf..d21e6e47b8 100644 --- a/src/presets/__snapshots__/create-jest-preset.spec.ts.snap +++ b/src/presets/__snapshots__/create-jest-preset.spec.ts.snap @@ -91,7 +91,6 @@ exports[`create-jest-preset CJS presets createJsWithTsPreset should return prese exports[`create-jest-preset ESM presets createDefaultEsmLegacyPreset should return preset config 1`] = ` { "extensionsToTreatAsEsm": [ - ".jsx", ".ts", ".tsx", ".mts", @@ -111,7 +110,6 @@ exports[`create-jest-preset ESM presets createDefaultEsmLegacyPreset should retu exports[`create-jest-preset ESM presets createDefaultEsmPreset should return preset config 1`] = ` { "extensionsToTreatAsEsm": [ - ".jsx", ".ts", ".tsx", ".mts", diff --git a/src/presets/create-jest-preset.ts b/src/presets/create-jest-preset.ts index f0a5cd755a..1fe265d33c 100644 --- a/src/presets/create-jest-preset.ts +++ b/src/presets/create-jest-preset.ts @@ -133,7 +133,7 @@ export function createDefaultEsmPreset(tsJestTransformOptions: DefaultEsmTransfo logger.debug('creating default ESM Jest preset') return { - extensionsToTreatAsEsm: [...JS_EXT_TO_TREAT_AS_ESM, ...TS_EXT_TO_TREAT_AS_ESM], + extensionsToTreatAsEsm: [...TS_EXT_TO_TREAT_AS_ESM], transform: { [ESM_TS_TRANSFORM_PATTERN]: [ 'ts-jest', @@ -152,7 +152,7 @@ export function createDefaultEsmLegacyPreset( logger.debug('creating default ESM Jest preset') return { - extensionsToTreatAsEsm: [...JS_EXT_TO_TREAT_AS_ESM, ...TS_EXT_TO_TREAT_AS_ESM], + extensionsToTreatAsEsm: [...TS_EXT_TO_TREAT_AS_ESM], transform: { [ESM_TS_TRANSFORM_PATTERN]: [ 'ts-jest/legacy',