-1👍
✅
mocks
option mocks instance properties. mocks: { methods }
assumes that there’s methods
property in Vue component. Since this.methods.searchJobs()
isn’t called, the test fails.
It’s searchJobs
method, the test should be as the working snippet shows:
shallowMount(JobSearchTest, {
methods: {
searchJobs
},
localVue })
Source:stackexchange.com