fix number of arguments to function call

This commit is contained in:
AlecM33
2022-12-17 15:12:23 -05:00
parent 6250f71819
commit 3b37585640
3 changed files with 14 additions and 4 deletions

View File

@@ -382,7 +382,7 @@ h1 {
#role-description {
overflow: auto;
position: absolute;
bottom: 8%;
bottom: 6%;
left: 50%;
transform: translate(-50%, 0);
font-size: 15px;
@@ -785,6 +785,14 @@ canvas {
font-size: 18px;
}
#game-people-container {
padding: 5px;
}
#players-alive-label {
font-size: 20px;
}
#client-name {
font-size: 20px;
}
@@ -810,8 +818,8 @@ canvas {
/* padding: 5px;*/
/*}*/
.game-player-name {
font-size: 16px;
.game-player-name, .game-player-role {
font-size: 14px;
}
#game-timer {

View File

@@ -85,7 +85,7 @@ class SocketManager {
if (!person) {
person = game.spectators.find((spectator) => spectator.id === args.personId);
}
gameManager.transferModeratorPowers(game, person, namespace, this.logger);
gameManager.transferModeratorPowers(socket, game, person, namespace, this.logger);
break;
case EVENT_IDS.CHANGE_NAME:
gameManager.changeName(game, args.data, ackFn);

View File

@@ -24,6 +24,7 @@ describe('GameManager', () => {
beforeEach(() => {
spyOn(namespace, 'to').and.callThrough();
spyOn(socket, 'to').and.callThrough();
});
describe('#transferModerator', () => {
@@ -127,6 +128,7 @@ describe('GameManager', () => {
expect(personToTransferTo.userType).toEqual(USER_TYPES.MODERATOR);
expect(tempMod.userType).toEqual(USER_TYPES.MODERATOR);
expect(namespace.to).toHaveBeenCalledOnceWith(personToTransferTo.socketId);
expect(socket.to).toHaveBeenCalledWith(game.accessCode);
});
});