Closed
Description
Version
1.0.0-beta.22
Reproduction link
wemake-services/wemake-vue-template#688
Steps to reproduce
- create a store
- mount a component with a store
- try to access a store on a instance of
vm
What is expected?
I expect that everything will still be working as it used to
What is actually happening?
I does not work. Raising this error:
RUNS ...
● unit tests for Comment component › should increment rating
TypeError: Cannot read property 'commit' of undefined
55 | const wrapper = mount(Comment, { store, localVue, propsData: { comment } })
56 |
> 57 | wrapper.vm.$store.commit(types.UPDATE_RATING, {
| ^
58 | commentId: comment.id,
59 | delta
60 | })
at Object.test (tests/components/comment.spec.js:57:23)
Here's the full test code: https://github.com/wemake-services/wemake-vue-template/blob/master/template/tests/components/comment.spec.js#L53-L68