Add unit test to test update function by folding List of Msg and then assert the updated Model. Using this, I uncovered, sometimes, the update function ignore the Tick msg, and doesn't update the currentTime in the Model. I think this is the root of the issue we have with the game.
Ideally, I want to write a complete unit test for all the other games, but I don't really have time to do all of that right now. At least we have a way to "simulate" user input and test the Model
Add unit test to test
update
function by foldingList
ofMsg
and then assert the updatedModel
. Using this, I uncovered, sometimes, theupdate
function ignore theTick
msg, and doesn't update thecurrentTime
in theModel
. I think this is the root of the issue we have with the game.Ideally, I want to write a complete unit test for all the other games, but I don't really have time to do all of that right now. At least we have a way to "simulate" user input and test the
Model