refactor(tests): extract buildCreateChange helper for 6F suite#6
Conversation
Addresses CodeRabbit nitpick on PR #5: the create-change payloads were duplicated across 6F2-6F8. Add a buildCreateChange(overrides) helper near the imports and route the 6F2-6F8 tests through it. Each test now declares only the fields that vary (targetSelector, element, position, malformed). No behavioural change - all 263 tests pass.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe pull request introduces a Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
Summary
Follow-up to #5 addressing CodeRabbit's nitpick: the
create-change payloads were duplicated across the 6F2-6F8 viewport-create tests. This PR extracts abuildCreateChange(overrides)helper near the imports and routes the 6F2-6F8 tests through it. Each test now declares only the fields that vary (targetSelector,element,position, malformed cases usetargetSelector: undefined).Pure refactor — no behavioural change. Net
-55lines.Test plan
npx jest --testPathPattern="DOMChangesPluginLite"— 7 suites, 263 passed (unchanged from main).npx jest --testPathPattern="crossVariantExposure" -t "6F"— all 11 6F.* tests pass.npm run lint— 0 errors after prettier.Summary by CodeRabbit
Release Notes
Note: This release contains no user-visible changes.