You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we test that this transition doesn't occur there are still multiple players when a player leaves?
Perhaps this can go in a beforeEach for the entire MultiplePlayers block:
constactor=interpret(lobbyMachine);actor.start();actor.send({type: "playerJoins",player: {socketId: "id",name: "a name"},});actor.send({type: "playerJoins",player: {socketId: "id-2",name: "a name 2"},});expect(actor.getSnapshot().value).toBe("MultiplePlayers")// another assertion that context.players.length === 2
This test could be transitions to the OnePlayer state if there are only two players and it receives a player leaves event, and the other test does not transition to the OnePlayer state if there are more than two players and it receives a player leaves event
Perhaps this can go in a
beforeEach
for the entireMultiplePlayers
block:This test could be
transitions to the OnePlayer state if there are only two players and it receives a player leaves event
, and the other testdoes not transition to the OnePlayer state if there are more than two players and it receives a player leaves event
Originally posted by @yndajas in #25 (comment)
The text was updated successfully, but these errors were encountered: