Trying to fix post test again.

This commit is contained in:
Dessalines 2020-12-11 20:20:14 -05:00
parent 4410d2e44d
commit d594005d49
2 changed files with 3 additions and 2 deletions

View file

@ -101,7 +101,7 @@ test('Create a post in a non-existent community', async () => {
test('Unlike a post', async () => {
let search = await searchForBetaCommunity(alpha);
let postRes = await createPost(alpha, search.communities[0].id);
await delay();
await longDelay();
let unlike = await likePost(alpha, 0, postRes.post);
expect(unlike.post.score).toBe(0);
await longDelay();
@ -113,6 +113,7 @@ test('Unlike a post', async () => {
// Make sure that post is unliked on beta
let searchBeta = await searchPost(beta, postRes.post);
await delay();
let betaPost = searchBeta.posts[0];
expect(betaPost).toBeDefined();

View file

@ -613,7 +613,7 @@ export async function followBeta(api: API): Promise<CommunityResponse> {
}
}
export function delay(millis: number = 500) {
export function delay(millis: number = 2000) {
return new Promise((resolve, _reject) => {
setTimeout(_ => resolve(), millis);
});