-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Async/Await in custom testEnvironment #6054
Comments
Your runtime has to support async-await (so use node 8 or newer) or you need to transpile. PR welcome with a doc update highlighting that fact! |
But doesn't jest already transpile the code? We can use async/await out of the box in test files. |
It transpiles your tests, not config files. You can track #5164 for it (feel free to add a comment about jest-environment as well there 🙂) |
I see, thank you! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
According to the docs, a custom test environment can be setup this way:
But when I do that, I get the following errors
Code:
env.js
The text was updated successfully, but these errors were encountered: