nqthqn / craconweb

https://www.cravecontrol.org
0 stars 1 forks source link

Fix issue with some Tick input are being ignored on update #86

Closed abadi199 closed 7 years ago

abadi199 commented 7 years ago

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

nqthqn commented 7 years ago

So, https://github.com/lumastories/craconweb/pull/86/commits/79fffdd9fbfe248b5b6859d98c6e7b48e01f70a5 fixes it?

abadi199 commented 7 years ago

yes