Skip to content

Commit 8f95113

Browse files
test: replace fs.rmSync with explicit cleanup in casing warning test
1 parent 3c19cac commit 8f95113

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎test/unitCases/Errors.unittest.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ describe("Errors", () => {
371371
message.lastIndexOf("file.js")
372372
);
373373
} finally {
374-
fs.rmSync(directory, { recursive: true, force: true });
374+
for (const file of fs.readdirSync(directory)) {
375+
fs.unlinkSync(path.join(directory, file));
376+
}
377+
fs.rmdirSync(directory);
375378
}
376379
});
377380

0 commit comments

Comments
 (0)