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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user