You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Store a reference to the original `IntersectionObserver` so we can restore it later.
15
28
// This can be relevant if testing in a browser environment, where you actually have a native `IntersectionObserver`.
16
29
constoriginalIntersectionObserver=
@@ -57,7 +70,7 @@ function getActFn() {
57
70
}
58
71
59
72
functionwarnOnMissingSetup(){
60
-
if(isMocking)return;
73
+
if(isMocking())return;
61
74
console.error(
62
75
`React Intersection Observer was not configured to handle mocking.
63
76
Outside Jest and Vitest, you might need to manually configure it by calling setupIntersectionMocking() and resetIntersectionMocking() in your test setup file.
@@ -82,7 +95,7 @@ afterEach(() => {
82
95
* @param mockFn The mock function to use. Defaults to `vi.fn`.
0 commit comments