Skip to content

Commit

Permalink
handle error for src folders while using tags (#3824)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsspriyansh authored Jul 26, 2023
1 parent fcb9dd8 commit 2e0b867
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/runner/folder-walk.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ class Walker {
err.showTrace = false;

if (Array.isArray(this.settings.src_folders) && this.settings.src_folders.length > 0) {
let srcFolders = this.settings.src_folders.map(item => `"${item}"`).join(', ');
const srcFolders = this.settings.src_folders.map(item => `"${item}"`).join(', ');
err.message += `; src_folders: ${srcFolders}`;
}

if (this.argv.group) {
let groups = this.argv.group.map(item => `"${item}"`).join(', ');
const groups = this.argv.group.map(item => `"${item}"`).join(', ');
err.message += `; group(s): ${groups}`;
}

Expand Down Expand Up @@ -118,7 +118,7 @@ class Walker {
matched = false;
}

let filename = filePath.split(path.sep).slice(-1)[0];
const filename = filePath.split(path.sep).slice(-1)[0];

if (this.settings.filename_filter) {
matched = matched && minimatch(filename, this.settings.filename_filter);
Expand All @@ -129,6 +129,10 @@ class Walker {
}

async applyTagFilter(list) {
if (!Array.isArray(list)) {
return;
}

if (!this.tags.anyTagsDefined() || this.usingCucumber) {
return list;
}
Expand All @@ -147,7 +151,7 @@ class Walker {
}

promiseFn(resolve, reject) {
let sourcePath = this.modulePathsCopy.shift();
const sourcePath = this.modulePathsCopy.shift();
let fullPath = path.resolve(sourcePath);

Utils.checkPath(fullPath)
Expand Down

0 comments on commit 2e0b867

Please sign in to comment.