mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-07 07:37:11 -04:00
fix: backend test
This commit is contained in:
parent
bed417780f
commit
fcf07b6f8b
3 changed files with 3 additions and 3 deletions
|
@ -109,8 +109,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --import=tsx --timeout 990000 --recursive tests/backend/specs ../node_modules/ep_*/static/tests/backend/specs",
|
||||
"test-container": "mocha --import=tsx --timeout 99000 tests/container/specs/api",
|
||||
"test": "mocha --import=tsx --timeout 4000 --recursive tests/backend/specs ../node_modules/ep_*/static/tests/backend/specs",
|
||||
"test-container": "mocha --import=tsx --timeout 5000 tests/container/specs/api",
|
||||
"dev": "node --import tsx node/server.ts",
|
||||
"prod": "node --import tsx node/server.ts",
|
||||
"ts-check": "tsc --noEmit",
|
||||
|
|
|
@ -188,7 +188,6 @@ exports.handshake = async (socket, padId, token = padutils.generateAuthorToken()
|
|||
* Convenience wrapper around `socket.send()` that waits for acknowledgement.
|
||||
*/
|
||||
exports.sendMessage = async (socket, message) => await new Promise((resolve, reject) => {
|
||||
if(message.type === "CHANGESET_REQ")
|
||||
socket.emit('message', message, (errInfo) => {
|
||||
if (errInfo != null) {
|
||||
const {name, message} = errInfo;
|
||||
|
|
|
@ -38,6 +38,7 @@ describe(__filename, function () {
|
|||
res = await agent.get(`/p/${roPadId}`).expect(200);
|
||||
roSocket = await common.connect(res);
|
||||
await common.handshake(roSocket, roPadId);
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue