Open alee opened 1 year ago
validate command implemented in 8fb9d3a1d7083c1b7e945940b0706d5af96408aa
checks against the following data points:
take an existing game playthrough and convert it into a data fixture that can be loaded into the test database and then we make assertions against that canned game
Doesn't make a ton of sense on second thought, since we want to be testing how the persistence of the game events reacts to changes as well as the simulation. Best to just define a more thorough stream of events
30df3a0ad25b39c8232203da3c8f7646d948e1cf increases coverage in the replay test. Its not too elegant, it mostly just extends the existing strategy of speccing out an event stream, replaying and making assertions against the simulation, but should reasonably cover potential breaking changes.
tests
increase test coverage in
replay.test.ts
to ensure that in-game actions are persisted properly@sgfost has a good suggestion to take an existing game playthrough and convert it into a data fixture that can be loaded into the test database and then we make assertions against that canned game
CLI validation
create a general CLI validate game command that takes a game id or game ids and validates the game state for that game. This
validate
function could potentially be put into theGameReplayer
class in services/replay.ts and be used in by the test above