Update CommentForm with vuex

This commit is contained in:
Matt Rider 2019-06-15 16:15:49 -03:00
parent 4adc450f43
commit 01eb25eca6

View File

@ -1,9 +1,10 @@
import { mount, createLocalVue, createWrapper } from '@vue/test-utils'
import CommentForm from './index.vue'
import Styleguide from '@human-connection/styleguide'
import Vuex from 'vuex'
const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Styleguide)
describe('CommentForm.vue', () => {
@ -35,8 +36,16 @@ describe('CommentForm.vue', () => {
})
describe('mount', () => {
const getters = {
'editor/placeholder': () => {
return 'some cool placeholder'
},
}
const store = new Vuex.Store({
getters,
})
const Wrapper = () => {
return mount(CommentForm, { mocks, localVue, propsData })
return mount(CommentForm, { mocks, localVue, propsData, store })
}
beforeEach(() => {