From d0a33f6f68d097724dc79570c2be28b9243ad529 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 16 Sep 2018 11:39:57 -0700 Subject: [PATCH] Ensure .cache folder is cleared before the first test run. --- script/test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/test.js b/script/test.js index d36a10c55..8f0d22fc1 100644 --- a/script/test.js +++ b/script/test.js @@ -57,8 +57,8 @@ nodeArgs.push( "tests.js" ) -const trashPaths = ignorePaths.filter(isKept) const terserOptions = fs.readJSONSync(path.resolve(rootPath, ".terserrc")) +const trashPaths = ignorePaths.filter(isKept) function cleanJS() { jsPaths.forEach((filename) => { @@ -75,7 +75,8 @@ function cleanRepo() { } function isKept(thePath) { - return keptPaths.every((dirname) => ! thePath.startsWith(dirname)) + return thePath.endsWith(".cache") || + keptPaths.every((dirname) => ! thePath.startsWith(dirname)) } function minifyJS(content) {