diff --git a/frontend/src/pages/Community.spec.js b/frontend/src/pages/Community.spec.js new file mode 100644 index 000000000..30bb2acda --- /dev/null +++ b/frontend/src/pages/Community.spec.js @@ -0,0 +1,41 @@ +import { mount } from '@vue/test-utils' +import Community from './Community' +// import { createContribution } from '@/graphql/mutations' + +// import { toastErrorSpy } from '@test/testSetup' + +const localVue = global.localVue + +const apolloMutationMock = jest.fn() +apolloMutationMock.mockResolvedValue('success') + +describe('Community', () => { + let wrapper + + const mocks = { + $t: jest.fn((t) => t), + $apollo: { + mutate: apolloMutationMock, + }, + $route: { + query: {}, + }, + } + + const Wrapper = () => { + return mount(Community, { + localVue, + mocks, + }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has a components community-page', () => { + expect(wrapper.find('div.community-page').exists()).toBe(true) + }) + }) +})