mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Update CommentForm with vuex
This commit is contained in:
parent
4adc450f43
commit
01eb25eca6
@ -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(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user