diff --git a/frontend/src/pages/Community.spec.js b/frontend/src/pages/Community.spec.js index 62ed46cbb..04cce68e6 100644 --- a/frontend/src/pages/Community.spec.js +++ b/frontend/src/pages/Community.spec.js @@ -4,32 +4,12 @@ import { toastErrorSpy, toastSuccessSpy } from '@test/testSetup' import { createContribution, updateContribution, deleteContribution } from '@/graphql/mutations' import { listContributions, listAllContributions, verifyLogin } from '@/graphql/queries' -import VueRouter from 'vue-router' -import routes from '../routes/routes' - const localVue = global.localVue -localVue.use(VueRouter) const mockStoreDispach = jest.fn() const apolloQueryMock = jest.fn() const apolloMutationMock = jest.fn() -const router = new VueRouter({ - base: '/', - routes, - linkActiveClass: 'active', - mode: 'history', - // scrollBehavior: (to, from, savedPosition) => { - // if (savedPosition) { - // return savedPosition - // } - // if (to.hash) { - // return { selector: to.hash } - // } - // return { x: 0, y: 0 } - // }, -}) - describe('Community', () => { let wrapper @@ -49,12 +29,17 @@ describe('Community', () => { $i18n: { locale: 'en', }, + $router: { + push: jest.fn(), + }, + $route: { + hash: 'my', + }, } const Wrapper = () => { return mount(Community, { localVue, - router, mocks, }) }