index.test.ts had grown to ~7000 lines with ~230 flat tests. Move the
tests into one file per topic, without changing any test:
- scroll-commands: scrollToIndex/Offset/By, reconcile, cancelScroll, read-backs
- measurement: resizeItem, measure(), ResizeObserver cache and batching
- range: defaultRangeExtractor and the lazy fast path
- ios-deferral: iOS deferred corrections, touch phases, Phase 2a/2b, TanStack#1250
- ios-fling-wait: iOS 27 commands that wait for a fling tail
- adjustment: scroll-up jank, self-write direction latch, TanStack#1218
- anchor-end: anchorTo end, followOnAppend, TanStack#1229, TanStack#1258
- dom-observers: elementScroll/windowScroll, observeElement/WindowOffset
- index: exports, lanes, setOptions, takeSnapshot
Helpers used by more than one file move to tests/helpers.ts; the others
stay next to their tests. Test bodies and names are unchanged; vitest
reports the same 408 tests before and after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🎯 Changes
packages/virtual-core/tests/index.test.tshad grown to ~7000 lines with ~230 flat tests. This PR moves the tests into one file per topic. Test bodies and names are unchanged.helpers.tswithexport:withFakeIOSUserAgent,makeDeferralHarness,makeMockScrollElement. All other helpers stay next to their tests.Evidence
main→ 408 tests, 407 passed, 1 skipped.After: vitest on this branch → 408 tests, 407 passed, 1 skipped. The set of
(fullName, status)pairs is identical.exportkeyword on the 3 shared helpers.tests/gives the same error count before and after (the existing errors come from loose test mocks;tests/is not part oftest:types).Merge Danger
Door: two-way
Tests only. A revert restores the single file.
Blast Radius: open-PRs
No published code changes. Open PRs that edit
index.test.tswill conflict and need a rebase that moves their new tests into the matching topic file:✅ Checklist
pnpm run test:pr.🚀 Release Impact
🤖 Generated with Claude Code
Summary by CodeRabbit