From 4adc450f439c06c645ea7bc46f16b8cccfffe953 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Sat, 15 Jun 2019 15:53:30 -0300 Subject: [PATCH] Fix failing test - add Vuex, with editor/placeholder getter --- .../ContributionForm/ContributionForm.spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index f7f306fc3..8b741443f 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -1,9 +1,11 @@ import { config, mount, createLocalVue } from '@vue/test-utils' import ContributionForm from './index.vue' import Styleguide from '@human-connection/styleguide' +import Vuex from 'vuex' const localVue = createLocalVue() +localVue.use(Vuex) localVue.use(Styleguide) config.stubs['no-ssr'] = '' @@ -53,8 +55,16 @@ describe('ContributionForm.vue', () => { }) describe('mount', () => { + const getters = { + 'editor/placeholder': () => { + return 'some cool placeholder' + }, + } + const store = new Vuex.Store({ + getters, + }) const Wrapper = () => { - return mount(ContributionForm, { mocks, localVue, computed }) + return mount(ContributionForm, { mocks, localVue, computed, store }) } beforeEach(() => {