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

fix for issue 4047 #4218

Closed
wants to merge 1 commit into from

Conversation

LeonardoSalvucci
Copy link

CLI will verify if args passed with --file exists and if not just ignore them and show a warning.

@jsf-clabot
Copy link

jsf-clabot commented Mar 25, 2020

CLA assistant check
All committers have signed the CLA.

@outsideris
Copy link
Member

#4047

@outsideris outsideris added type: bug a defect, confirmed by a maintainer area: usability concerning user experience or interface labels Apr 4, 2020
Copy link
Member

@boneskull boneskull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Like @outsideris wrote in the description of #4047, this should work like --require. So if you run mocha --require foo.js, and foo.js does not exist, an error will be printed and Mocha will exit. Instead, this prints a warning and continues. Can you please change the behavior?

I believe what you'll need to do is throw an exception instead of calling console.warn. Use throw createNoFilesMatchPatternError(msg) from lib/errors.js, where msg is Cannot find test file ${filename}

@juergba juergba closed this May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: usability concerning user experience or interface type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants