refactor game state curator

This commit is contained in:
AlecM33
2022-12-27 18:46:38 -05:00
parent f7c31096a9
commit cc5a423168
3 changed files with 13 additions and 47 deletions

View File

@@ -222,7 +222,7 @@ describe('GameManager', () => {
);
expect(GameStateCurator.getGameStateFromPerspectiveOfPerson)
.toHaveBeenCalledWith(gameRunner.activeGames.get('abc'), player, gameRunner, socket, logger);
.toHaveBeenCalledWith(gameRunner.activeGames.get('abc'), player);
});
it('should send the game state to a matching person who reset their connection', () => {
@@ -243,7 +243,7 @@ describe('GameManager', () => {
);
expect(GameStateCurator.getGameStateFromPerspectiveOfPerson)
.toHaveBeenCalledWith(gameRunner.activeGames.get('abc'), player, gameRunner, socket, logger);
.toHaveBeenCalledWith(gameRunner.activeGames.get('abc'), player);
expect(player.socketId).toEqual(socket.id);
expect(socket.join).toHaveBeenCalled();
});