fix preparing test

This commit is contained in:
LouisLam 2021-10-05 20:37:32 +08:00
parent f0670dde20
commit 2bf6a04f81
2 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,9 @@
const fs = require("fs"); const fs = require("fs");
fs.rmdirSync("./data/test-chrome-profile", { const path = "./data/test-chrome-profile";
recursive: true,
}); if (fs.existsSync(path)) {
fs.rmdirSync(path, {
recursive: true,
});
}

View File

@ -1,5 +1,9 @@
const fs = require("fs"); const fs = require("fs");
fs.rmdirSync("./data/test", { const path = "./data/test";
recursive: true,
}); if (fs.existsSync(path)) {
fs.rmdirSync(path, {
recursive: true,
});
}