Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue regarding error if a folder defined in src_folders is empty when using tags #3824

Merged
merged 6 commits into from
Jul 26, 2023

Conversation

itsspriyansh
Copy link
Contributor

@itsspriyansh itsspriyansh commented Jul 20, 2023

image

The error originates in the function applyTagFilter which lies in folder-walk.js
The cause of the error is that when any folder that is defined in src_folders in the file nightwatch.conf.js, is empty, the list parameter of the function applyTagFilter goes undefined. When the function executes, it uses the Array property .map() on list parameter which is undefined and hence the error.

To fix this, an if condition is added to the top of the function body which returns the function if the parameter list doesn't qualify as an array.

Fixes: #3823

@github-actions
Copy link

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

@itsspriyansh itsspriyansh changed the title Fixed the error issue if a folder defined in src_folders is empty when using tags Fixed the issue regarding error if a folder defined in src_folders is empty when using tags Jul 20, 2023
lib/runner/folder-walk.js Outdated Show resolved Hide resolved
lib/runner/folder-walk.js Outdated Show resolved Hide resolved
@garg3133 garg3133 requested a review from beatfactor July 26, 2023 10:12
@gravityvi gravityvi merged commit 2e0b867 into nightwatchjs:main Jul 26, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting error if a folder defined in src_folders is empty when using tags
4 participants