Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
Better error message if file is missing ai#221
  • Loading branch information
ivanhofer committed May 13, 2021
1 parent 19c5e36 commit 61a765f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/webpack/get-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ function checkIfFilesExist(limitConfig, check) {

let filesToCheck = new Set()
if (check.files) {
for (let file of check.files) {
filesToCheck.add(file)
if (Array.isArray(check.files)) {
for (let file of check.files) {
filesToCheck.add(file)
}
} else {
filesToCheck.add(check.files)
}
}
if (check.path) {
filesToCheck.add(join(cwd, check.path))
}


let filesToIgnore = (check.ignore || []).filter(Boolean).map(file => join(cwd, file))
filesToCheck = Array.from(filesToCheck).filter(file => !filesToIgnore.includes(file))

Expand Down

0 comments on commit 61a765f

Please sign in to comment.