Skip to content

Commit 122ca11

Browse files
committed
test: add test for component
1 parent ac5845e commit 122ca11

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: test/specs/mount.spec.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,18 @@ describeRunIf(process.env.TEST_ENV !== 'node',
197197
expect(wrapper.vm.$options.listeners).to.equal(undefined)
198198
})
199199

200-
it('handles store correctly', () => {
200+
it('injects store correctly', () => {
201201
const localVue = createLocalVue()
202202
localVue.use(Vuex)
203203
const store = new Vuex.Store()
204204
const wrapper = mount(ComponentAsAClass, {
205205
store,
206206
localVue
207207
})
208-
console.log(wrapper.vm.$store.getters)
208+
wrapper.vm.getters
209+
mount({
210+
template: '<div>{{$store.getters}}</div>'
211+
}, { store, localVue })
209212
})
210213

211214
it('propagates errors when they are thrown', () => {

0 commit comments

Comments
 (0)