itaditya / trick-or-treat-game

Play it for free here
https://trick-or-treat.netlify.com/
16 stars 17 forks source link

tidy tests #12

Closed itaditya closed 5 years ago

itaditya commented 5 years ago

@flagoon we were missing this line https://github.com/itaditya/collect-squares-game/blob/master/src/tests/Game.test.js#L8

flagoon commented 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.

itaditya commented 5 years ago

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.