Skip to content

Commit

Permalink
Ensure .cache folder is cleared before the first test run.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 16, 2018
1 parent 304908e commit d0a33f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script/test.js
Expand Up @@ -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) => {
Expand All @@ -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) {
Expand Down

0 comments on commit d0a33f6

Please sign in to comment.