()
| 149 | * Reset the IntersectionObserver mock to its initial state, and clear all the elements being observed. |
| 150 | */ |
| 151 | export 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`. |
no outgoing calls
no test coverage detected
searching dependent graphs…