(chore): refactor Map.test.js to map.test.tsx (#43897)

* chore: rename Map.test.js to map.test.tsx

* chore: refactor Map.test.js to typescript
This commit is contained in:
Ahmed Ghoneim
2021-10-18 21:40:09 +02:00
committed by GitHub
parent a927257e1d
commit 0d1055fd08
2 changed files with 6 additions and 2 deletions

View File

@ -3,10 +3,14 @@ import { useStaticQuery } from 'gatsby';
import React from 'react'; import React from 'react';
import mockChallengeNodes from '../../__mocks__/challenge-nodes'; import mockChallengeNodes from '../../__mocks__/challenge-nodes';
import { Map } from './'; import { Map } from '.';
const mockedUseStaticQuery = useStaticQuery as jest.MockedFunction<
typeof useStaticQuery
>;
beforeEach(() => { beforeEach(() => {
useStaticQuery.mockImplementationOnce(() => ({ mockedUseStaticQuery.mockImplementationOnce(() => ({
allChallengeNode: { allChallengeNode: {
nodes: mockChallengeNodes nodes: mockChallengeNodes
} }