Open
Description
So for your mock, axios return a promise with value which is a happy path. However, what if i want to mock it to return an error.
Wonder if i can do like this
const func = jest.fn();
jest.mock('axios', () => {
get: func
});
then in each test case, can i do func.mockReturnValue for happy and error case?
Metadata
Metadata
Assignees
Labels
No labels