Closed regevbr closed 4 years ago
When performing mockReset, the jest.fn() method is being reset which is great, but the inner state of the calledWith scope is maintained, thus the jest.fn() is not called again with mockImplementation and the call stack just gets piled up
the fix is pretty easy, we need to check if the jest.fn() has an implementation, and if not, mock it and reset the stack. PR is coming soon
When performing mockReset, the jest.fn() method is being reset which is great, but the inner state of the calledWith scope is maintained, thus the jest.fn() is not called again with mockImplementation and the call stack just gets piled up