/** * Mocks the IntersectionObserver API for testing environments. * * This function adds a mock implementation of the IntersectionObserver API to the global window object. * The mock implementation provides all the necessary methods (observe, unobserve, disconnect, takeRecords) * but with empty implementations, allowing tests of components that use IntersectionObserver to run * without errors in Jest's JSDOM environment. * * Useful for testing components that rely on: * - Lazy loading * - Infinite scrolling * - Visibility-based rendering * - Any other intersection-based functionality * * @example * // In your jest setup file * import { setupIntersectionObserver } from '@trackunit/react-test-setup'; * * setupIntersectionObserver(); */ export declare const setupIntersectionObserver: () => typeof MockIntersectionObserver; declare class MockIntersectionObserver { readonly root: Element | null; readonly rootMargin: string; readonly scrollMargin: string; readonly thresholds: ReadonlyArray; constructor(); disconnect(): void; observe(): void; takeRecords(): Array; unobserve(): void; } export {};