I am using the function setMethods, it is still working, however I received the above message on the console. I am wondering what should be the new approach?.
It is being used to spy on a method and then see if it was called with the mocked parameters, here is the code:
const spyGenerateCalendar = jest.spyOn(wrapper.vm, 'generateCalendar');
const spyAxiosRequest = jest.spyOn(axios, 'get');
// setting methods for spying
wrapper.setMethods({generateCalendar: spyGenerateCalendar});
wrapper.vm.generateCalendar();
// Expecting calls
expect(spyGenerateCalendar).toHaveBeenCalled();
expect(spyAxiosRequest).toBeCalledWith(axiosRequestURL, axiosRequestParams);