We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6aa945 commit 0477f37Copy full SHA for 0477f37
test/TestCases.test.js
@@ -23,7 +23,7 @@ function clearDirectory(dirPath) {
23
for (let i = 0; i < files.length; i++) {
24
const filePath = `${dirPath}/${files[i]}`;
25
26
- if (fs.statSync(filePath).isFile()) {
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
27
fs.unlinkSync(filePath);
28
} else {
29
clearDirectory(filePath);
0 commit comments