tests: chat: Wait for message ack

rhansen-chat
Richard Hansen 2022-04-07 18:03:07 -04:00
parent 8d062b254e
commit 33c46cb002
1 changed files with 4 additions and 9 deletions

View File

@ -31,15 +31,10 @@ const checkHook = async (hookName, checkFn) => {
}); });
}; };
const sendMessage = (socket, data) => { const sendMessage = async (socket, data) => (
socket.send({ await common.sendMessage(socket, {type: 'COLLABROOM', component: 'pad', data}));
type: 'COLLABROOM', const sendChat = async (socket, message) => (
component: 'pad', await sendMessage(socket, {type: 'CHAT_MESSAGE', message}));
data,
});
};
const sendChat = (socket, message) => sendMessage(socket, {type: 'CHAT_MESSAGE', message});
describe(__filename, function () { describe(__filename, function () {
const padId = 'testChatPad'; const padId = 'testChatPad';