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

Upgrade to Jest 27 for improved performance and RN upgrade compatibility #6170

Merged
merged 54 commits into from
May 11, 2023

Conversation

Fatxx
Copy link
Contributor

@Fatxx Fatxx commented Apr 11, 2023

Description

This pull request upgrades our testing framework from Jest 26 to Jest 27, taking advantage of improved performance, better error messages, and new features that will help streamline our testing process and ensure a higher quality codebase.

Changes

  • Upgraded Jest from version 26 to version 27
  • Updated all dependencies and configurations related to Jest

This PR will also accommodate future support for React Native and Detox upgrades.

Screenshots/Recordings

If applicable, add screenshots and/or recordings to visualize the before and after of your change

Issue

Related with https://github.com/MetaMask/mobile-planning/issues/477

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@Fatxx Fatxx marked this pull request as ready for review April 11, 2023 22:29
@Fatxx Fatxx requested a review from a team as a code owner April 11, 2023 22:29
@Fatxx Fatxx marked this pull request as draft April 11, 2023 22:30
@Fatxx Fatxx changed the title Fix/unit test memory leaks Update to latest Jest and drop Enzyme in favor of RTL Apr 25, 2023
@socket-security
Copy link

socket-security bot commented May 9, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Ignoring: node-ipc@9.2.1, caf@15.0.1, bunyan-debug-stream@3.1.0, json-cycle@1.5.0, multi-sort-stream@1.0.4, jest-circus@27.5.1, multipipe@4.0.0, trace-event-lib@1.4.1, supports-hyperlinks@2.3.0, babel-plugin-istanbul@6.1.1, js-message@1.0.7, foreach@2.0.5, @react-native-cookies/cookies@6.2.1, yocto-queue@0.1.0, js-queue@2.0.2, duplexer2@0.1.4, event-pubsub@4.3.0, filelist@1.0.4, stream-chain@2.2.5, easy-stack@1.0.1

Pull request alert summary
Issue Status
Critical CVE ✅ 0 issues
CVE ✅ 0 issues
Mild CVE ✅ 0 issues
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script confusion ✅ 0 issues
Bin script shell injection ✅ 0 issues
Filesystem access ✅ 0 issues
Network access ✅ 0 issues
Shell access ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
GitHub dependency ✅ 0 issues
No bug tracker ✅ 0 issues
No contributors or author data ✅ 0 issues
No README ✅ 0 issues
Deprecated ✅ 0 issues
New author ✅ 0 issues
Unstable ownership ✅ 0 issues
Non-existent author ✅ 0 issues
Unmaintained ✅ 0 issues
Unpublished package ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
AI detected security risk ✅ 0 issues
AI warning ✅ 0 issues

📊 Modified Dependency Overview:

⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
detox@20.9.0 19.11.0...20.9.0 None +82/-64 wix.mobile
jest@27.5.1 26.6.3...27.5.1 None +61/-58 simenb
babel-jest@27.5.1 26.6.3...27.5.1 None +10/-8 simenb
@types/jest@27.5.2 27.0.1...27.5.2 None +4/-3 types

@Cal-L Cal-L marked this pull request as ready for review May 9, 2023 01:28
@Fatxx
Copy link
Contributor Author

Fatxx commented May 10, 2023

LGTM ✅

cortisiko added 3 commits May 10, 2023 17:46
* bump detox + update config

* temporarily disabling tests because of limitation with RN66. We will enable tests with the RN71 upgrade

* remove unused imports

* remove unused blocked

* fix linting
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

This only affects the unit tests. Detox was updated and tests passed. ✅

@Cal-L Cal-L force-pushed the fix/unit-test-memory-leaks branch from 660732f to 099ef86 Compare May 11, 2023 18:55
@Cal-L Cal-L merged commit 3bf091a into main May 11, 2023
@Cal-L Cal-L deleted the fix/unit-test-memory-leaks branch May 11, 2023 19:58
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2023
@gauthierpetetin gauthierpetetin added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release. release-6.6.0 Issue or pull request that will be included in release 6.6.0 Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants