mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix test timeout
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
createAndPopulateGroup,
|
createAndPopulateGroup,
|
||||||
|
sleep,
|
||||||
} from '../../../../helpers/api-v3-integration.helper';
|
} from '../../../../helpers/api-v3-integration.helper';
|
||||||
|
|
||||||
describe('POST /groups/:id/chat/seen', () => {
|
describe('POST /groups/:id/chat/seen', () => {
|
||||||
@@ -28,6 +29,8 @@ describe('POST /groups/:id/chat/seen', () => {
|
|||||||
const initialNotifications = guildMember.notifications.length;
|
const initialNotifications = guildMember.notifications.length;
|
||||||
await guildMember.post(`/groups/${guild._id}/chat/seen`);
|
await guildMember.post(`/groups/${guild._id}/chat/seen`);
|
||||||
|
|
||||||
|
await sleep(0.5);
|
||||||
|
|
||||||
let guildThatHasSeenChat = await guildMember.get('/user');
|
let guildThatHasSeenChat = await guildMember.get('/user');
|
||||||
|
|
||||||
expect(guildThatHasSeenChat.notifications.length).to.equal(initialNotifications - 1);
|
expect(guildThatHasSeenChat.notifications.length).to.equal(initialNotifications - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user