From 1edf159e334e26869ad0280785a105f26703b942 Mon Sep 17 00:00:00 2001 From: Max Pushkin Date: Fri, 6 May 2022 11:47:19 +0300 Subject: [PATCH] fix: stable run of setup.js in case of leftovers --- setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.js b/setup.js index 90e8f1a..d00dad4 100644 --- a/setup.js +++ b/setup.js @@ -40,7 +40,7 @@ module.exports = async function () { promises.push(waitForLocalhost(port)); } - const {TableNames: tableNames} = await Promise.race(promises); + const [{TableNames: tableNames}] = await Promise.all(promises); await deleteTables(dynamoDB, tableNames); // cleanup leftovers } catch (err) { // eslint-disable-next-line no-console