MCPcopy Index your code
hub / github.com/thebuilder/react-intersection-observer / resetIntersectionMocking

Function resetIntersectionMocking

src/test-utils.ts:151–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149 * Reset the IntersectionObserver mock to its initial state, and clear all the elements being observed.
150 */
151export function resetIntersectionMocking() {
152 if (
153 window.IntersectionObserver &&
154 "mockClear" in window.IntersectionObserver &&
155 typeof window.IntersectionObserver.mockClear === "function"
156 ) {
157 window.IntersectionObserver.mockClear();
158 }
159 observers.clear();
160}
161
162/**
163 * Destroy the IntersectionObserver mock function, and restore the original browser implementation of `IntersectionObserver`.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…