tests: chat: Wait for message ack
parent
8d062b254e
commit
33c46cb002
|
@ -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';
|
||||||
|
|
Loading…
Reference in New Issue