I'd love a second set of eyes on this before I merge it to master.
Basically the change is making the timer-state.js file export a class that can be new'd up. Then the specs can just create a new instance for each test and we don't have to do the after() calls to put the data back for the next test. (Tests affecting each other makes me sad.)
I also threw in a TestTimer -- a simple test double that let me remove the async specs, control the tests better, and remove the setTestingSpeed() call. I thought about using sinon or chai mocks of some kind, but figured we should discuss that as a group later.
Thoughts? Should I make any other changes before I merge?
I'd love a second set of eyes on this before I merge it to master.
Basically the change is making the
timer-state.js
file export a class that can be new'd up. Then the specs can just create a new instance for each test and we don't have to do theafter()
calls to put the data back for the next test. (Tests affecting each other makes me sad.)I also threw in a
TestTimer
-- a simple test double that let me remove the async specs, control the tests better, and remove thesetTestingSpeed()
call. I thought about using sinon or chai mocks of some kind, but figured we should discuss that as a group later.Thoughts? Should I make any other changes before I merge?