immich/web/src/lib/__mocks__/intersection-observer.mock.ts
Michel Heusschen 8e6bc13540
feat: people infinite scroll (#11326)
* feat: people infinite scroll

* add infinite scroll to show & hide modal

* update unit tests

* show total people count instead of currently loaded

* update personsearchdto
2024-07-25 15:59:28 -04:00

10 lines
200 B
TypeScript

import { vi } from 'vitest';
export const getIntersectionObserverMock = () =>
vi.fn(() => ({
disconnect: vi.fn(),
observe: vi.fn(),
takeRecords: vi.fn(),
unobserve: vi.fn(),
}));