-
-
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
#1818: implement --production flag #1935
Conversation
Stricter testing mode. Fails tests that are: pending, marked as skipped, marked as only, have duplicate title
Any thoughts on this? |
Thanks for the PR! :) @boneskull what do you think? |
My 2¢ - I'd want to fail on Only is something that should never be committed, if it's present then it must be a mistake (like leaving in a Pending or skipped I'll sometimes use to allow merging code which will later need updates - I can configure CI tools to count these and show builds as unstable if needed. |
Same here.
If I commit a I'm not fond of the flag's name, I wonder if there's anyone who doesn't want CI to fail when tests have |
Perhaps |
IIRC 'strict' was the original idea for the flag but 'production' was suggested in order to avoid similarities to 'strict mode' which it isn't really related to. Taking pending and skip filtering out of this PR would be easy enough. I could see the case for leaving pending in. Not so sure about skips, though. |
IMO skip is for temporally (days, weeks, hopefully not more) disabling some tests, because they are no longer correct, they have to be reworked, the code they are covering is undergoing changes and I don't care about it being covered or not, whatever. So I want those to be committed, and not to break the build. Sadly, I still don't have a better naming proposal, but I'll continue thinking about it.
|
👎 @aaroncrows is this suitable for the use case? |
A feature like this may be helpful, but since there's a (arguably better) workaround via ESLint, I'm not in a hurry to merge this... |
it doesn't cover |
This can be closed, due to changes in 3.0.0 in how the internals of it work. The original issue of #1818 needs a new PR. |
Addresses #1818 and #1759.
Adds a --production flag that fails tests that are: pending, marked as skipped, marked as only, or have a duplicate title.
Since only is determined by grep the only way I could think to catch them is to fail a test if it sees a grep. Since this is, in a way, a linter meant to be run over all the tests before a commit or the like I figured that wouldn't be an issue. At the moment it only catches at the test level, so it won't catch suites marked as skipped or only.