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

Update Jest config to avoid transpiling dependencies #16068

Merged
merged 2 commits into from
Oct 4, 2022
Merged

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Oct 4, 2022

By default Jest looks at the module field of a package before looking at main. The module field is often used for the ESM version of a package, which is not supported by our configuration.

Previously we solved this by transpiling all dependencies that had this issue. In this PR I changed it to only look at main, which is usually the CJS version of a package. This removes the need for transpiling dependencies, and could speed up the tests slightly.

I also bumped Jest to a stable (non-alpha) version of 29.

@Mrtenz Mrtenz requested a review from a team as a code owner October 4, 2022 11:28
@Mrtenz Mrtenz requested a review from danjm October 4, 2022 11:28
@metamaskbot
Copy link
Collaborator

Builds ready [f0e0bb4]
Page Load Metrics (2521 ± 240 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint981881262412
domContentLoaded179033882497494237
load179033882521500240
domInteractive179033882497494237

Copy link
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

Niiice.

@Mrtenz Mrtenz merged commit 22f07ae into develop Oct 4, 2022
@Mrtenz Mrtenz deleted the mrtenz/fix-jest branch October 4, 2022 15:58
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants