From 7668ce5c5f0f186437907f1c352d3a62e3ae8ba7 Mon Sep 17 00:00:00 2001 From: dovidweisz Date: Fri, 27 Nov 2020 13:09:44 -0500 Subject: [PATCH] fix: Fix issues in tests --- tests/useIntersection.test.tsx | 2 +- tests/useSearchParam.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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