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 --strict flag #1818

Closed
charlierudolph opened this issue Jul 28, 2015 · 8 comments · Fixed by #2696
Closed

add --strict flag #1818

charlierudolph opened this issue Jul 28, 2015 · 8 comments · Fixed by #2696
Assignees
Labels
status: accepting prs Mocha can use your help with this one! type: feature enhancement proposal

Comments

@charlierudolph
Copy link
Contributor

I'd like a --strict CLI flag that will cause my tests to exit with non-zero status if

  • any test is marked as only
  • any test is marked as skipped
  • any test is marked as pending
@boneskull
Copy link
Contributor

This may be a good solution to the problem of accidentally committing these.

@mochajs/mocha any opinions?

@dasilvacontin
Copy link
Contributor

Hmm, I thought skipped tests are actually marked as pending?

People do commit these (looking at you .only), so I believe this is useful, and I'm looking forward to it.

Not so sure about the tests marked as skipped/pending.. If I skip tests is because I don't want to run them anymore, not even in prod.. not sure about you.

@armandabric
Copy link

I would love to have this!

If you do not want a test (even in prod): it's probably because this is a dead/outdated test and need to be deleted from the source code.

@dasilvacontin
Copy link
Contributor

cc @mochajs/mocha

@danielstjules
Copy link
Contributor

Could we use some different terminology so that it's not confused with node/v8's --use_strict ?

@boneskull
Copy link
Contributor

How about --production

aaron-j-krause added a commit to aaron-j-krause/mocha that referenced this issue Oct 21, 2015
Stricter testing mode. Fails tests that are: pending, marked as skipped, marked as only, have duplicate title
@boneskull boneskull added status: accepting prs Mocha can use your help with this one! type: feature enhancement proposal labels Aug 28, 2016
@IvanGuardado
Copy link

IvanGuardado commented Sep 27, 2016

What is the status of this issue? I've been following the related PRs but they seem to be all closed.

I think this is an important configuration and I was surprised that it didn't exist since some commit could add a .only and the test suite would be giving invalid feedback...

Thanks!

@boneskull
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Mocha can use your help with this one! type: feature enhancement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants