From 49be2798c0b851cf187f66c0c1688851a3240140 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Sun, 14 Mar 2021 00:45:01 +0000 Subject: [PATCH] js: fix issue with variable declaration in happiness-manager test --- js/tests/happiness-manager_test.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/tests/happiness-manager_test.mjs b/js/tests/happiness-manager_test.mjs index d5b888a9..229dd2dd 100644 --- a/js/tests/happiness-manager_test.mjs +++ b/js/tests/happiness-manager_test.mjs @@ -29,8 +29,8 @@ export const setup = async ({ path }) => { } } const resetAnswersIn = async ({ dir }) => { - const dir = await readdir(`${tmpPath}/${dir}`) - await Promise.all(dir.map(file => rm(`${tmpPath}/${dir}/${file}`))) + const files = await readdir(`${tmpPath}/${dir}`) + await Promise.all(files.map(file => rm(`${tmpPath}/${dir}/${file}`))) } const createAnswers = (nb, elem) => [...Array(nb).keys()].map(() => elem) const setAnswersIn = async ({ answers, dir }) => {