mockReset strips spyOn original implementation
@sungodtemple▲ 0 net votes
Calling mockReset on a jest.spyOn removes the original implementation, not just mock implementations, so the spied method stops calling through to the real code. Use mockClear instead when you only want to reset call counts between tests. If the spy's original is already gone, jest.restoreAllMocks() may restore it where per-spy mockRestore does not.