From ff07fc44e218cd1559bbd99a0ad82430ed052376 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Sep 2023 11:03:37 -0400 Subject: [PATCH] fix: failing test due to increased chat message delay --- test/messaging.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/messaging.js b/test/messaging.js index 395d0f8764..9ebd832ddf 100644 --- a/test/messaging.js +++ b/test/messaging.js @@ -138,6 +138,18 @@ describe('Messaging Library', () => { }); describe('rooms', () => { + const _delay1 = meta.config.chatMessageDelay; + const _delay2 = meta.config.newbieChatMessageDelay; + before(async () => { + meta.config.chatMessageDelay = 0; + meta.config.newbieChatMessageDelay = 0; + }); + + after(async () => { + meta.config.chatMessageDelay = _delay1; + meta.config.newbieChatMessageDelay = _delay2; + }); + it('should fail to create a new chat room with invalid data', async () => { const { body } = await callv3API('post', '/chats', {}, 'foo'); assert.equal(body.status.message, await translator.translate('[[error:required-parameters-missing, uids]]'));