Cast the mock method to jest.Mock, ie
import axios from "axios"
import Request from "./Request";
// Create an Axios mock
// Don't worry about the order, Jest will hoist this above the imports
// See https://jestjs.io/docs/manual-mocks#using-with-es-module-imports
jest.mock("axios", () => ({
create: jest.fn()
}))
// Customise the `create` mock method
(axios.create as jest.Mock).mockReturnValue({
get: getMock
})