DEV Community

Discussion on: Why you should cleanup after render

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

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()