From a1a12e68d16624eb89b4f6ff40ae5350d2feb449 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 3 Jan 2023 14:41:00 +0100 Subject: [PATCH] fixed infostatistic tests --- frontend/src/pages/InfoStatistic.spec.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/InfoStatistic.spec.js b/frontend/src/pages/InfoStatistic.spec.js index e6475ed41..dc8e75f7e 100644 --- a/frontend/src/pages/InfoStatistic.spec.js +++ b/frontend/src/pages/InfoStatistic.spec.js @@ -1,10 +1,14 @@ -import { mount } from '@vue/test-utils' +import { mount, RouterLinkStub } from '@vue/test-utils' import InfoStatistic from './InfoStatistic' import { toastErrorSpy } from '../../test/testSetup' import { listContributionLinks, communityStatistics, searchAdminUsers } from '@/graphql/queries' const localVue = global.localVue +const stubs = { + RouterLink: RouterLinkStub, +} + const apolloQueryMock = jest .fn() .mockResolvedValueOnce({ @@ -70,7 +74,7 @@ describe('InfoStatistic', () => { } const Wrapper = () => { - return mount(InfoStatistic, { localVue, mocks }) + return mount(InfoStatistic, { localVue, mocks, stubs }) } describe('mount', () => {