0👍
This implementation spying on the method works for me:
test('fetchItem is called properly', async () => {
let wrapper = shallowMount(YourComponent)
const spy = jest.spyOn(wrapper.vm, 'fetchItem')
.mockImplementation(() => {
expect(spy).toHaveBeenCalledWith()
})
})
Source:stackexchange.com