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. |
Cal-L
left a comment
There was a problem hiding this comment.
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. |
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. |








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