Difference between mockClear, mockReset, mockRestore in Jest
Some questions that came up while working on Jest.
Difference between mockClear, mockReset, mockRestore
mockClear clears the call history of a mock.
const mockFn = jest.fn();
mockFn(); // call 1
mockFn(); // call 2
expect(mockFn).toHaveBeenCalledTime...
vijayt.hashnode.dev1 min read