diff --git a/tests/useIntersection.test.tsx b/tests/useIntersection.test.tsx index bdb7bc059e..c088a89a48 100644 --- a/tests/useIntersection.test.tsx +++ b/tests/useIntersection.test.tsx @@ -81,7 +81,7 @@ describe('useIntersection', () => { it('should return null if IntersectionObserver is not supported', () => { targetRef = createRef(); targetRef.current = document.createElement('div'); - delete window.IntersectionObserver; + delete (window as any).IntersectionObserver; expect(() => renderHook(() => useIntersection(targetRef, {}))).not.toThrow(); }); diff --git a/tests/useSearchParam.test.ts b/tests/useSearchParam.test.ts index ca6d22ba89..d3be101631 100644 --- a/tests/useSearchParam.test.ts +++ b/tests/useSearchParam.test.ts @@ -6,7 +6,7 @@ const { location } = window; let mockSearch: string; beforeEach(() => { - delete window.location; + delete (window as any).location; const { search, ...restLocation } = location; // @ts-ignore