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
Describe the bug
Test suit fails. I suspect it is related to ES modules.
In this case the test was launched by a VSCode add-in for Jest. I will research and add more details.
Repro setup just like #385, but I ran git and npm install.
** messages **
[my-app]: Scheduled test run "watch-tests-1" for "orta.vscode-jest:my-app"
FAIL src/main.spec.ts
● Test suite failed to run
src/main.spec.ts:25:39 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
25 const dir = dirname(fileURLToPath(import.meta.url))
~~~~~~~~~~~
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 3.21 s
* Screenshot *

Activity
BurtHarris commentedon Jul 15, 2022
It passes when run by the NPM script. So this is probably something specific to the jest extension.