TanStackT
TanStack3y ago
1 reply
faint-white

Mocking scrollToIndex with jest

Since the Virtualizer is getting compiled to a function on the build output, jest.spyOn(Virtualizer.prototype, 'scrollToIndex') will not work

What would then be the best way to check that scrollToIndex is called with the correct value within a test?
Was this page helpful?