mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +01:00
fix: failing test due to increased chat message delay
This commit is contained in:
@@ -138,6 +138,18 @@ describe('Messaging Library', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('rooms', () => {
|
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 () => {
|
it('should fail to create a new chat room with invalid data', async () => {
|
||||||
const { body } = await callv3API('post', '/chats', {}, 'foo');
|
const { body } = await callv3API('post', '/chats', {}, 'foo');
|
||||||
assert.equal(body.status.message, await translator.translate('[[error:required-parameters-missing, uids]]'));
|
assert.equal(body.status.message, await translator.translate('[[error:required-parameters-missing, uids]]'));
|
||||||
|
|||||||
Reference in New Issue
Block a user