Thank you for sharing your example. This reminds me of when I realized the need of putting someMock.mockReset() in the beforeEach when you’re spying on something with Jest. Because if you don’t you might have false positives when calling expect(someMock).toHaveBeenCalled()
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.