refactor: move analytics data deletion out of MetaMetrics (3/4 web3auth)#26025
Conversation
Simplify MetaMetrics mock in Onboarding tests by removing deletion-related methods that are never called or asserted.
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26025 +/- ##
==========================================
+ Coverage 80.70% 81.15% +0.44%
==========================================
Files 4361 4389 +28
Lines 113120 113438 +318
Branches 24093 24397 +304
==========================================
+ Hits 91296 92055 +759
+ Misses 15476 14989 -487
- Partials 6348 6394 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
wait for #26023 to merge |
…web3auth_split_3-4
…web3auth_split_3-4
…web3auth_split_3-4
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: This is a test-only change that:
Since no production code is changed and this is purely a unit test mock cleanup, no E2E tests need to be run to validate this change. The unit tests themselves will validate that the mock simplification doesn't break the test suite. Performance Test Selection: |
|



Description
Part 3/4 of #25767 — Code owner: web3auth
Removes unused MetaMetrics deletion mock methods from the Onboarding component test. The Onboarding test never calls or asserts on
createDataDeletionTask,checkDataDeleteStatus,getDeleteRegulationCreationDate,getDeleteRegulationId,isDataRecorded,updateDataRecordingFlag, orconfigure, so these mock properties are dead code.What changed:
Onboarding/index.test.tsx— simplifiedMetaMetrics.getInstance()mock from an object with 7 unused deletion stubs to an empty object{}.Changelog
CHANGELOG entry: null
Related issues
Fixes #25767
Fixes https://consensyssoftware.atlassian.net/browse/MCWP-297
Manual testing steps
N/A — test-only change.
Screenshots/Recordings
N/A — test-only change.
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Test-only change that simplifies a Jest mock; no production code or runtime behavior is affected.
Overview
Simplifies
Onboarding/index.test.tsxby trimming theMetaMetrics.getInstance()Jest mock from a set of unused data-deletion stubs to an empty object, reducing dead test setup tied to analytics deletion APIs.Written by Cursor Bugbot for commit 3174a65. This will update automatically on new commits. Configure here.