Try this,
jest.mock("@myORG/axiosWrapperReactQuery", () => {
const original = jest.requireActual("@myORG/axiosWrapperReactQuery");
return {
...original,
getAllCourses: jest.fn()
.mockImplementationOnce(() => ({
isLoading: false, // 1st call
typedData: [],
}))
.mockImplementationOnce(() => ({
isLoading: true, // 2nd call
typedData: [],
}))
}
* Be the first to Make Comment