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

Add --forbid-only and --forbid-pending options #2503

Closed
irfancharania opened this issue Sep 21, 2018 · 3 comments
Closed

Add --forbid-only and --forbid-pending options #2503

irfancharania opened this issue Sep 21, 2018 · 3 comments

Comments

@irfancharania
Copy link

Is there any chance of exposing the "--forbid-only" and "--forbid-pending" Mocha flags in Cypress CLI?
mochajs/mocha#2696

Looking for a way to easily identify/prevent accidental commits of tests marked as "only" or "skip"

@bahmutov
Copy link
Contributor

We use this little helper to detect .only in the spec files https://github.com/bahmutov/stop-only and maybe you can add ".skip" detection there?

@irfancharania
Copy link
Author

Found another workaround:

The "mocha-avoid-only" rule in this tslint ruleset solves the issue:
https://github.com/Microsoft/tslint-microsoft-contrib

@Floriferous
Copy link

What is preventing cypress from using the native --forbid-only flag in mocha? Would it work now with v4?

It'd be great to use them directly instead of using another library

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

No branches or pull requests

3 participants