Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harijoe committed Feb 7, 2022
1 parent 5af1b03 commit badc06f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions frontend/src/__mocks__/axios.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { render } from 'services/testing/reactTestingLibraryWrapper';
import 'isomorphic-fetch';
import { QueryClient, QueryClientProvider } from 'react-query';
import { mockThemeResponse } from 'components/pages/search/mocks';
import { GeotrekAPI } from 'services/api/client';
import { mockPoiTypeRoute } from 'modules/poiType/mocks';
import { mockPoiRoute } from 'modules/poi/mocks';
import { mockTouristicContentRoute } from 'modules/touristicContent/mocks';
Expand All @@ -22,8 +23,11 @@ import {
rawDifficulty,
rawRoute,
} from 'modules/details/mocks/mocks';

import { DetailsUI } from '../';

GeotrekAPI.defaults.adapter = require('axios/lib/adapters/http');

describe('Details', () => {
const idToTest = 2;
const titleToTest = 'Col de Font Froide';
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/pages/home/__tests__/Home.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import { render } from 'services/testing/reactTestingLibraryWrapper';
import 'isomorphic-fetch';

import { QueryClient, QueryClientProvider } from 'react-query';
import { GeotrekAPI } from 'services/api/client';

import { getGlobalConfig } from 'modules/utils/api.config';
import { Home } from '../';
import { mockActivitySuggestionsResponse } from '../mocks';

GeotrekAPI.defaults.adapter = require('axios/lib/adapters/http');

describe('Home page', () => {
const queryClient = new QueryClient();
it('AAU, I can see an activity suggestion', async () => {
Expand Down

0 comments on commit badc06f

Please sign in to comment.