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

[jest-expo] fix jest-preset mutating react-native preset #9051

Merged
merged 2 commits into from Dec 3, 2020

Conversation

alex-fournier
Copy link
Contributor

Why

Fixes #9050

Due to a change in jest-config since v25.0.0, the jest-preset.js file is called twice.
The current implement of expo's jest-preset is based on mutating react-native's jest-preset.
The problem is that now, this file is called twice so the mutation is applied twice, leading to warnings in console and a corrupted jest-preset in output.

How

With a cloneDeep, the origin preset is no longer mutated and the output is now deterministic.

Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ci passes this lgtm

@renanmav
Copy link

Shall we merge?

@hesyifei
Copy link
Contributor

hesyifei commented Sep 3, 2020

Any update on this?

@renanmav
Copy link

cc @brentvatne

@renanmav
Copy link

Any news?

@brentvatne brentvatne merged commit c0c386e into expo:master Dec 3, 2020
@brentvatne
Copy link
Member

thanks, this will go out with sdk-40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jest-expo] expo's jest-preset is called twice, leading to warnings in console and a corrupted jest-preset
4 participants