Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: unable to use proper tsconfig with ESM #3836

Closed
newsiberian opened this issue Sep 25, 2022 · 1 comment · Fixed by #3833
Closed

[Bug]: unable to use proper tsconfig with ESM #3836

newsiberian opened this issue Sep 25, 2022 · 1 comment · Fixed by #3833
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@newsiberian
Copy link

Version

29.0.2

Steps to reproduce

Expected behavior

test should work

Actual behavior

jest throwns an error

Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.

Debug log

{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.0.2"},"message":"creating jest presets not handling JavaScript files","sequence":1,"time":"2022-09-25T19:37:16.570Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"29.0.2"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2022-09-25T19:37:16.596Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"29.0.2"},"message":"creating Importer singleton","sequence":3,"time":"2022-09-25T19:37:17.718Z"}

Additional context

I know, there were similar issues, but according to them, the problem was solved by jest@29. Maybe my setup is a bit wrong here?

Environment

System:
    OS: Linux 5.13 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  npmPackages:
    jest: 29.0.3 => 29.0.3
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 27, 2022

Fixed in #3833 and will be included in the next patch release

@ahnpnl ahnpnl closed this as completed Sep 27, 2022
@ahnpnl ahnpnl linked a pull request Sep 27, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Confirmed Bug is confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants