Skip to content

Commit

Permalink
remove try/catch when cleaning data in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ETLaurent committed Apr 29, 2024
1 parent 7d791cd commit e6007cc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,15 +1479,11 @@ async function getExtractedFiles(extractPath) {
}

async function cleanData(paths) {
try {
for (const filePath of paths) {
const files = await fs.readdir(filePath);
for (const name of files) {
await fs.rm(path.join(filePath, name), { recursive: true });
}
for (const filePath of paths) {
const files = await fs.readdir(filePath);
for (const name of files) {
await fs.rm(path.join(filePath, name), { recursive: true });
}
} catch (err) {
assert(!err);
}
}

Expand Down

0 comments on commit e6007cc

Please sign in to comment.