From 2dbdd1818f9b9f175b065731a825198b29366b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 8 Feb 2022 17:36:28 -0500 Subject: [PATCH] test: fix occasional test failure --- test/topics/thumbs.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/topics/thumbs.js b/test/topics/thumbs.js index 9526e35c5d..58fb464595 100644 --- a/test/topics/thumbs.js +++ b/test/topics/thumbs.js @@ -262,10 +262,8 @@ describe('Topic thumbs', () => { }); it('should handle an array of relative paths', async () => { - await Promise.all([ - topics.thumbs.associate({ id: 1, path: thumbPaths[0] }), - topics.thumbs.associate({ id: 1, path: thumbPaths[1] }), - ]); + await topics.thumbs.associate({ id: 1, path: thumbPaths[0] }); + await topics.thumbs.associate({ id: 1, path: thumbPaths[1] }); await topics.thumbs.delete(1, [relativeThumbPaths[0], relativeThumbPaths[1]]); }); @@ -276,10 +274,8 @@ describe('Topic thumbs', () => { }); it('should decrement numThumbs if dissociated one by one', async () => { - await Promise.all([ - topics.thumbs.associate({ id: 1, path: thumbPaths[0] }), - topics.thumbs.associate({ id: 1, path: thumbPaths[1] }), - ]); + await topics.thumbs.associate({ id: 1, path: thumbPaths[0] }); + await topics.thumbs.associate({ id: 1, path: thumbPaths[1] }); await topics.thumbs.delete(1, [relativeThumbPaths[0]]); let numThumbs = parseInt(await db.getObjectField('topic:1', 'numThumbs'), 10);