Skip to content

Commit

Permalink
fix: Fix issues in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dovidweisz committed Nov 27, 2020
1 parent 0c20e7e commit 7668ce5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/useIntersection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion tests/useSearchParam.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7668ce5

Please sign in to comment.