You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exports[`TsCompiler isolatedModule false should compile codes with useESM true 1`] =`
52
+
"export const thing = {a: 1, b: 2};
53
+
//# "
103
54
`;
104
55
105
56
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with pathRegex config is undefined 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
106
57
107
58
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with pathRegex config matches file name 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
108
59
109
60
exports[`TsCompiler isolatedModule true jsx option should compile tsx file for jsx preserve 1`] =`
Copy file name to clipboardexpand all lines: website/docs/esm-support.md
+33-4
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,36 @@ title: ESM Support
4
4
5
5
To use `ts-jest` with ESM support, you'll first need to check [ESM Jest documentation](https://jestjs.io/docs/en/ecmascript-modules).
6
6
7
-
`ts-jest` supports ESM via a config option `useESM`. When this option is enabled and depending on which files Jest supports
8
-
ESM, `ts-jest` will transform codes to ESM syntax. There are also 3 presets to use with `useESM` option.
9
-
10
-
More information see [useESM option](options/useESM.md) and [ESM presets](presets.md)
7
+
`ts-jest` supports ESM via a config option [useESM](options/useESM.md) in combination with jest config option [extensionsToTreatAsEsm](https://jestjs.io/docs/en/next/configuration#extensionstotreatasesm-arraystring).
8
+
9
+
There are also [3 presets](presets.md) to work with ESM.
0 commit comments