Skip to content

Commit

Permalink
fix: failing test due to increased chat message delay
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Sep 7, 2023
1 parent 223e765 commit ff07fc4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/messaging.js
Expand Up @@ -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]]'));
Expand Down

0 comments on commit ff07fc4

Please sign in to comment.