We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74b2dad commit c83c0cbCopy full SHA for c83c0cb
1 file changed
jest.config.js
@@ -1,9 +1,8 @@
1
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2
3
-const runNatively = !!process.features.typescript;
+const nativeESM = !!process.features.typescript;
4
5
-module.exports = {
6
- runner: runNatively ? 'jest-light-runner' : undefined,
+const config = {
7
preset: 'ts-jest/presets/default-esm',
8
testEnvironment: 'node',
9
moduleDirectories: ['node_modules', 'src'],
@@ -13,7 +12,13 @@ module.exports = {
13
12
diagnostics: {
14
ignoreCodes: [151001],
15
},
16
- useESM: runNatively,
+ useESM: nativeESM,
17
18
19
};
+
20
+if (nativeESM) {
21
+ config.runner = 'jest-light-runner';
22
+}
23
24
+module.exports = config;
0 commit comments