test(tui): isolate viewport-height remount regression

Keep the resize delta below the virtual history scroll quantum so the regression test specifically depends on viewport height entering the snapshot key.
This commit is contained in:
Brooklyn Nicholson 2026-05-23 14:06:08 -05:00
parent 4fea02cc16
commit cc61e3be49

View file

@ -129,7 +129,7 @@ describe('useVirtualHistory offset cache reuse', () => {
try {
await delay(20)
instance.rerender(React.createElement(Harness, { expose, height: 24, items, maxMounted: 80 }))
instance.rerender(React.createElement(Harness, { expose, height: 9, items, maxMounted: 80 }))
await delay(80)
expect(viewportIsMounted(items, expose.current!.virtualHistory, expose.current!.scroll!)).toBe(true)