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
use ESM module,
use the latest typescript version - 5.6.3,
set "resolveJsonModule": true in the tsconfig.json,
in an source file with the tested functionality put something like this:
start a test suit, which tests functionality in the file changed before
Expected behavior
tests from the test suit are started
Actual behavior
● Test suite failed to run
SyntaxError: The requested module '../package.json' does not provide an export named 'name'
at Runtime.linkAndEvaluateModule (../../../../node_modules/jest-runtime/build/index.js:708:5)
Additional context
workaround: instead of the named import, import whole json object:
Version
29.7.0
Steps to reproduce
use ESM module,
use the latest typescript version - 5.6.3,
set
"resolveJsonModule": true
in the tsconfig.json,in an source file with the tested functionality put something like this:
start a test suit, which tests functionality in the file changed before
Expected behavior
tests from the test suit are started
Actual behavior
● Test suite failed to run
Additional context
workaround: instead of the named import, import whole json object:
Environment
The text was updated successfully, but these errors were encountered: