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
run NODE_OPTIONS="--experimental-vm-modules" npx jest
test will fail with message:
FAIL ./my-test.test.ts
● Test suite failed to run
my-environment.ts:4:13 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
4 console.log(import.meta.url)
Expected behavior
Expect the testEnvironment to be transpiled as expected using ESM.
Actual behavior
testEnvironment is transpiled as commonjs
Debug log
I tried to post the logs but github complained saying it was too long.
Additional context
It looks like the transpilation happens normally for the tests but the useESM is not affecting the testEnvironment.
Version
29.1.1
Steps to reproduce
NODE_OPTIONS="--experimental-vm-modules" npx jest
Expected behavior
Expect the
testEnvironment
to be transpiled as expected using ESM.Actual behavior
testEnvironment
is transpiled as commonjsDebug log
I tried to post the logs but github complained saying it was too long.
Additional context
It looks like the transpilation happens normally for the tests but the
useESM
is not affecting thetestEnvironment
.Environment
The text was updated successfully, but these errors were encountered: