From d81acc8500dae42e518d711ef491a5ea1923f0b7 Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Thu, 6 Apr 2023 15:23:26 +0300 Subject: [PATCH] TET: Fix unit tests by removing next/router mock --- frontend/tet/youth/src/__tests__/index.test.tsx | 2 -- frontend/tet/youth/src/__tests__/postings.test.tsx | 2 -- frontend/tet/youth/src/__tests__/show.test.tsx | 2 -- 3 files changed, 6 deletions(-) diff --git a/frontend/tet/youth/src/__tests__/index.test.tsx b/frontend/tet/youth/src/__tests__/index.test.tsx index 7a0eceb807..d9b07239a6 100644 --- a/frontend/tet/youth/src/__tests__/index.test.tsx +++ b/frontend/tet/youth/src/__tests__/index.test.tsx @@ -10,8 +10,6 @@ import IndexPage from 'tet/youth/pages'; import getYouthTranslationsApi from './utils/i18n/get-youth-translations'; -jest.mock('next/router'); - describe('frontend/tet/youth/src/pages/index.tsx', () => { const { translations: { [DEFAULT_LANGUAGE]: translations }, diff --git a/frontend/tet/youth/src/__tests__/postings.test.tsx b/frontend/tet/youth/src/__tests__/postings.test.tsx index 9ed6d2b706..44ba609ed4 100644 --- a/frontend/tet/youth/src/__tests__/postings.test.tsx +++ b/frontend/tet/youth/src/__tests__/postings.test.tsx @@ -14,8 +14,6 @@ import renderPage from 'tet/youth/__tests__/utils/components/render-page'; import Postings from 'tet/youth/pages'; import { fakeEventListYouth } from 'tet-shared/__tests__/utils/fake-objects'; -jest.mock('next/router'); - const postings = fakeEventListYouth(['Avustaja', 'Kirjasto']); describe('frontend/tet/youth/src/pages/postings.tsx', () => { diff --git a/frontend/tet/youth/src/__tests__/show.test.tsx b/frontend/tet/youth/src/__tests__/show.test.tsx index 4796b4592b..1fe2db15e4 100644 --- a/frontend/tet/youth/src/__tests__/show.test.tsx +++ b/frontend/tet/youth/src/__tests__/show.test.tsx @@ -3,8 +3,6 @@ import React from 'react'; import renderComponent from 'tet/youth/__tests__/utils/components/render-component'; import ShowPostingPage from 'tet/youth/pages'; -jest.mock('next/router'); - describe('frontend/tet/youth/src/pages/postings/show.tsx', () => { beforeAll(() => { Object.defineProperty(window, 'matchMedia', {