-
-
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
feat: allow test environment to run with preset/transform #8751
Conversation
Hmm, maybe we could stick some abstraction for this into |
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.
Code itself LGTM! Would love to reduce the code duplication as discussed
Don't worry about the OOM for circus on CI btw - it's not your fault |
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.
Code LGTM as well, left a few comments in addition to what Simen said.
*/ | ||
|
||
it('should add two numbers', () => { | ||
expect(1 + 1).toBe(2); |
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.
Maybe we should use something from the env here just to be sure that it was properly loaded
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, forgot to submit
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ffc8f08
to
a2e6f88
Compare
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.
This LGTM, needs to wait for us to start merging breaking changes
This comment has been minimized.
This comment has been minimized.
485de83
to
2571c1f
Compare
@SimenB Why did the roadmap change from |
Feedback from FB that this was potentially very breaking. Code wise still good to go, I'll sync with peeps at FB to make sure we can land it in 27 🙂 |
Hey @SimenB, any update on this? Just want to confirm it's on track for v27. |
It is 👍 |
c4d3387
to
a48e7e9
Compare
@SimenB I rebased it, I had to squash the commits into a single commit to simplify the merge conflict |
4661c8b
to
ab4f9fb
Compare
Thanks so much for this change folks! Do you know in which version will this be available? thanks! |
You can install |
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
Fixes #8479. The exact same approach as #7562.
Runtime
create an instance ofTransformer
require
and perform the transformrequire
As of now the logic for the transformation is repeated across
jest-cli
,jest-runner
,jest-runtime
packages. Can you give me some inputs on whether it can be extracted to a single location?Test plan
Existing test cases should not be affected by the change, an additional test where the environment needs to be transformed to pass is added.