js: fix issue with variable declaration in happiness-manager test

This commit is contained in:
Clement Denis 2021-03-14 00:45:01 +00:00
parent f9c76eda34
commit 49be2798c0
1 changed files with 2 additions and 2 deletions

View File

@ -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 }) => {