diff --git a/client/src/components/Map/Map.test.tsx b/client/src/components/Map/Map.test.tsx deleted file mode 100644 index ebf24d4077..0000000000 --- a/client/src/components/Map/Map.test.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { render } from '@testing-library/react'; -import { useStaticQuery } from 'gatsby'; -import React from 'react'; - -import mockChallengeNodes from '../../__mocks__/challenge-nodes'; -import { Map } from './'; - -beforeEach(() => { - (useStaticQuery as jest.Mock).mockImplementationOnce(() => ({ - allChallengeNode: { - nodes: mockChallengeNodes - } - })); -}); - -// set .scrollTo to avoid errors in default test environment -window.scrollTo = jest.fn(); - -test(' snapshot', () => { - const { container } = render(); - - expect(container).toMatchSnapshot('Map'); -}); - -const props = { - forLanding: true -}; diff --git a/client/src/components/Map/__snapshots__/Map.test.tsx.snap b/client/src/components/Map/__snapshots__/Map.test.tsx.snap deleted file mode 100644 index 8af928ccf5..0000000000 --- a/client/src/components/Map/__snapshots__/Map.test.tsx.snap +++ /dev/null @@ -1,499 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` snapshot: Map 1`] = ` -
- -
-`; diff --git a/client/src/components/Map/map.test.tsx b/client/src/components/Map/map.test.tsx index 18aa043991..336608bdf0 100644 --- a/client/src/components/Map/map.test.tsx +++ b/client/src/components/Map/map.test.tsx @@ -5,12 +5,8 @@ import React from 'react'; import mockChallengeNodes from '../../__mocks__/challenge-nodes'; import { Map } from '.'; -const mockedUseStaticQuery = useStaticQuery as jest.MockedFunction< - typeof useStaticQuery ->; - beforeEach(() => { - mockedUseStaticQuery.mockImplementationOnce(() => ({ + (useStaticQuery as jest.Mock).mockImplementationOnce(() => ({ allChallengeNode: { nodes: mockChallengeNodes }