Thanks for you help in advance.
How is the mounted() method
mocked for testing?
The Component is like this:
export default {
name: 'ShowToDo',
...
mounted(){
this.$store.dispatch('download_todo')
},
...
}
Instead, the Component-test is:
const localVue = createLocalVue()
localVue.use(Vuex)
wrapper = mount(ShowToDo, {
store,
localVue,
mounted(){}
}
)
})
It seems that mounted(){}
is ignored, because the test try to execute this.$store.dispatch('download_todo')
.
Thanks in advance.