Skip to content

Commit 0477f37

Browse files
test: fix
1 parent c6aa945 commit 0477f37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/TestCases.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function clearDirectory(dirPath) {
2323
for (let i = 0; i < files.length; i++) {
2424
const filePath = `${dirPath}/${files[i]}`;
2525

26-
if (fs.statSync(filePath).isFile()) {
26+
if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
2727
fs.unlinkSync(filePath);
2828
} else {
2929
clearDirectory(filePath);

0 commit comments

Comments
 (0)