-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: Reduce enzymes usage 1/3 #8721
chore: Reduce enzymes usage 1/3 #8721
Conversation
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. |
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.
Left comments of simplified tests using existing utility functions
@timi-codes Left some comments |
Thanks for the feedback @Cal-L I have updated 15/17 of the test files and made the recommended changes. The remaining two files are The root file snapshot render null and the confetti snapshot change every time because of the randomness of the Views. ![]() ![]() |
On
The snapshot will reduce to only return null but that's fine for now since this isn't a critical component. |
For the Root component snapshot tests, you can update the test file to look like this: ![]() After that, you can remove some of the mocks ![]() Your Root snapshot should update and the output should remain deterministic |
@timi-codes Left some comments regarding Confetti and Root components |
@Cal-L Thank you. For the Root file, I was referring to All the files are now ready for review. |
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.
Left some comments @timi-codes
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.
LGTM, thanks for your contribution!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8721 +/- ##
==========================================
+ Coverage 43.27% 43.53% +0.26%
==========================================
Files 1271 1271
Lines 30916 30916
Branches 3092 3092
==========================================
+ Hits 13378 13460 +82
+ Misses 16765 16682 -83
- Partials 773 774 +1 ☔ View full report in Codecov by Sentry. |
@timi-codes Merging into a branch based on main and will follow up with a PR to merge into main. |
72b8eb6
into
MetaMask:chore/8616-reduce-enzyme-usage
Description
Convert the list of unit tests to use react-testing-library instead of enzyme for the following files:
Related issues
Fixes: #8616
Manual testing steps
Not Applicable
Screenshots/Recordings
Not Applicable
Pre-merge author checklist
Pre-merge reviewer checklist