TanStackT
TanStack3y ago
4 replies
nursing-lime

How do I mock the dimensions and scrolling for testing?

I need to test a behavior that only triggers after scrolling the list to the end.

Is there a suggestion on which things I should mock to achieve this? I've been trying some things (HTMLElement.prototype.scrollHeight, HTMLElement.prototype.getBoundingClientRect) but virtual always renders all the elements.
Was this page helpful?