docs(testing): encode CV independent-load and mockReset flake rules - #181
Merged
Merged
Conversation
CV flakes often come from awaiting a sibling skeleton, asserting empty-state or list rows before hydration, or using clearAllMocks after a test mutates Engine implementations. Route *.view.test files away from unit fake-timer patterns. Co-authored-by: Cursor <cursoragent@cursor.com>
racitores
enabled auto-merge (squash)
September 23, 2026 12:25
javiergarciavera
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the component-view flake learnings that were missing from the Mobile testing skill (sibling loading phases, empty-state/list hydration,
mockResetvsclearAllMocks, delayed negative asserts). Existing CV rules for nestedfindBy*, stale press, and awaiting gated content are unchanged.flaky-test-detectionnow routes*.view.test.ts(x)to component-view instead of unit fake-timer patterns (J2 / J8).Type of Change
Checklist
Testing
Docs-only. Reviewed against existing CV golden rules 10/14/15 to avoid duplication; new checklist items 16–19 and diagnosing-table rows cover the remaining families.
Additional Context
Companion experimental-task PR: https://github.com/MetaMask/experimental-mm-qa-ai-tasks/pull/271
Test plan
mobile-testingCV writing-tests / reference when writing or fixing a*.view.test.tsxmockResetappear in the self-review checklist and diagnosing tableflaky-test-detectiondoes not recommend fake timers for view testsMade with Cursor