test: socket.emit doesnt exist in tests

This commit is contained in:
Barış Soner Uşaklı
2021-11-09 10:51:44 -05:00
parent 1719bff89c
commit 61d1f56500
2 changed files with 5 additions and 3 deletions

View File

@@ -253,7 +253,7 @@ Sockets.getCountInRoom = function (room) {
};
Sockets.warnDeprecated = (socket, replacement) => {
if (socket.previousEvents) {
if (socket.previousEvents && socket.emit) {
socket.emit('event:deprecated_call', {
eventName: socket.previousEvents[socket.previousEvents.length - 1],
replacement: replacement,