Testing requests with jest and axios using a custom instance
const mockAxios = jest.genMockFromModule('axios')
mockAxios.get = jest.fn(() => Promise.resolve({ data: {} }))
mockAxios.post = jest.fn(() => Promise.resolve({ data: {} }))
mockAxios.put = jest.fn(() => Promise.resolve({ data: {} }))
mockAxios.patch = jest.fn(() => Promise.resolve({ data: {} }))
mockAxios.create = jest.fn(() => mockAxios)
export default mockAxios