Skip to content

Commit

Permalink
fix: set value ts/tsx extensionsToTreatAsEsm in default esm preset
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Aug 19, 2024
1 parent 00550ef commit d9ff362
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/presets/__snapshots__/create-jest-preset.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/presets/create-jest-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit d9ff362

Please # to comment.