Skip to content

Commit

Permalink
fix: fsPromises issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BelgianNoise committed Jan 17, 2022
1 parent 1290a42 commit 0d421b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/integration/Quota.test.ts
Expand Up @@ -49,7 +49,12 @@ async function clearInitialFiles(rootFilePath: string, pods: string[]): Promise<
const fileList = await fsPromises.readdir(join(rootFilePath, pod));
for (const file of fileList) {
if (file !== '.meta') {
await fsPromises.rmdir(join(rootFilePath, pod, file), { recursive: true });
const path = join(rootFilePath, pod, file);
if ((await fsPromises.stat(path)).isDirectory()) {
await fsPromises.rmdir(path, { recursive: true });
} else {
await fsPromises.unlink(path);
}
}
}
}
Expand Down

0 comments on commit 0d421b3

Please sign in to comment.