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
freephoenix888@freephoenix888:~/Programming/deep/npm-automation$ export TS_JEST_LOG=ts-jest.log && npm run test --templateNamePattern "sync"
> @deep-foundation/[email protected] test
> jest sync
FAIL __tests__/sync-dependencies.ts
● Test suite failed to run
src/sync-dependencies.ts:31:82 - error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
31 const {default: deepJson}: {default: Package} = await import(deepJsonFilePath, {assert: {type: 'json'}}) ;
~~~~~~~~~~~~~~~~~~~~~~~~
src/sync-dependencies.ts:33:97 - error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
33 const {default: packageJson}: {default: Partial<PackageJson>} = await import(packageJsonPath, {assert: {type: 'json'}});
~~~~~~~~~~~~~~~~~~~~~~~~
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 2.187 s
Ran all test suites matching /sync/i.
> ###@1.9.0 test
> node --no-warnings=ExperimentalWarning --experimental-import-meta-resolve --loader ts-node/esm/transpile-only --max-old-space-size=8192 ./node_modules/jest/bin/jest.js formsection
FAIL ### packages/guidebook-widget/src/components/GuidebookModal/FormView/FormSection/FormSection.spec.tsx
● Test suite failed to run
packages/guidebook-widget/src/components/GuidebookModal/FormView/FormSection/FormSection.tsx:29:68 - error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
29 import translations from '../../../../config/translations/de.json' assert { type: 'json' }
~~~~~~~~~~~~~~~~~~~~~~~
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 8.535 s
(I've used # to replace confidential data)
ESM is used all across the project (the package type is module).
Version
29.1.1 (latest)
Steps to reproduce
git clone https://github.com/deep-foundation/npm-automation.git
cd npm-automation
git checkout 89153a08e34165a7b4d27730c295cdfd38c0c097
npm clean-intall
npm run test --templateNamePattern "sync"
Expected behavior
I expect tests to run without this error
Actual behavior
Tests run with this error
Debug log
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: