fix specs

This commit is contained in:
AlecM33
2023-01-31 23:21:57 -05:00
parent a99d19614c
commit 038af79e47

View File

@@ -28,6 +28,9 @@ describe('game page', () => {
once: function (message, handler) {
this.eventHandlers[message] = handler;
},
timeout: (duration) => {
return mockSocket;
},
emit: function (eventName, ...args) {
switch (args[0]) { // eventName is currently always "inGameMessage" - the first arg after that is the specific message type
case globals.EVENT_IDS.FETCH_GAME_STATE:
@@ -93,6 +96,9 @@ describe('game page', () => {
on: function (message, handler) {
this.eventHandlers[message] = handler;
},
timeout: (duration) => {
return mockSocket;
},
emit: function (eventName, ...args) {
switch (args[0]) { // eventName is currently always "inGameMessage" - the first arg after that is the specific message type
case globals.EVENT_IDS.FETCH_GAME_STATE:
@@ -167,6 +173,9 @@ describe('game page', () => {
on: function (message, handler) {
this.eventHandlers[message] = handler;
},
timeout: (duration) => {
return mockSocket;
},
once: function (message, handler) {
this.eventHandlers[message] = handler;
},