-
-
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
feature: allow ESM for test environment #11033
Conversation
Anyone here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and sorry about the slow response!
In addition to the inline comment I made, this needs an integration test. You can look at e.g. #11163 where I added support for ESM transformers for inspiration for how to write the integration test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(oops, previous review should have been "request changed")
@SimenB I tried to add a dummy test. Simply create a simple ESM test environment and run a test with this environment. |
@SimenB I'd love to be able to test on my local repo and potentially start using it until #11167 is merged in. Running Thanks a lot |
@gilles-yvetot if you wanna test with a local build, we have instructions in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look pretty good! You also need to add a test which actually runs the integration test - something like https://github.com/facebook/jest/blob/master/e2e/__tests__/nativeEsm.test.ts (see https://github.com/facebook/jest/blob/master/CONTRIBUTING.md#integration-tests)
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Support for native ESM has been included but we did not have the possibility yet to also use ESM for custom test environment
Test plan
I don't really know how to test that and I'd love some help on that