For one mock:
fn.mockClear() // Clears mock usage date (fn.mock.calls, fn.mock.instances) fn.mockReset() // Clears and removes any mocked return values or implementations fn.mockRestore() // Resets and restores the initial implementation
Note:
mockRestoreworks only with mocks created byjest.spyOn.
For all mocks:
jest.clearAllMocks() jest.resetAllMocks() jest.restoreAllMocks()