-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
flag to fail if .only() present. #1125
Comments
in your ci, add a step that greps for onlys before your tests run. this doesn't need to be in mocha. |
Yes, but a grep would have to be implemented by everyone. It'd be nice to have this out-of-the-box. It's something I regularly struggle against because sometimes the joy of getting a |
FYI for future visitors, here's the grep command that I've used that works for me: grep -rq --include '*.spec.js' it.only . && echo 'You have it.only() in your tests!' && exit 1 |
Version 3.5.0 recently introduced the |
It would be nice to have a flag to fail the test run if a
.only()
has been left the suite.Really need this for CI to people don't forget to remove their
.only()
s.Because of the way it's implemented maybe a
--no-grep
flag would make sense.The text was updated successfully, but these errors were encountered: