Closed itaditya closed 5 years ago
By 'this line' you mean afterEach(cleanup)? It was, AFAIK, dealt by import 'react-testing-library/cleanup-after-each'. But maybe I misunderstood something.
Oh ok, probably some confusion on my end. However I like the current solution. It clearly shows that we are cleaning after each test.
It is less common to see a dependency performing some tasks just by importing it. I always expect imports to be called like performWork()
to work. Feels less magic to me.
@flagoon we were missing this line https://github.com/itaditya/collect-squares-game/blob/master/src/tests/Game.test.js#L8