From f93351dcdd8bc1db75f1ecd48f2af17e42f8e03e Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 12 Jul 2022 10:03:51 +0200 Subject: [PATCH] add test for ContributionForm.vue --- .../Contributions/ContributionForm.spec.js | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 frontend/src/components/Contributions/ContributionForm.spec.js diff --git a/frontend/src/components/Contributions/ContributionForm.spec.js b/frontend/src/components/Contributions/ContributionForm.spec.js new file mode 100644 index 000000000..c0635ed52 --- /dev/null +++ b/frontend/src/components/Contributions/ContributionForm.spec.js @@ -0,0 +1,29 @@ +import { mount } from '@vue/test-utils' +import ContributionForm from './ContributionForm.vue' + +const localVue = global.localVue + +describe('ContributionForm', () => { + let wrapper + + const mocks = { + $t: jest.fn((t) => t), + } + + const Wrapper = () => { + return mount(ContributionForm, { + localVue, + mocks, + }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has a DIV .contribution-form', () => { + expect(wrapper.find('div.contribution-form').exists()).toBe(true) + }) + }) +})