-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
undefined steps should always fail the test run #867
Comments
Or, we should change the default mode to strict, so the user explicitly have to specify that pending/undefined/ambiguous scenarios are allowed without failing the build. |
It makes complete sense to me. |
cucumber-js moved to strict mode by default in 2.0. This is regardless of strict mode though. I like only allowing pending steps through on non-strict since those require something explicit from the user. |
It seems simplest to explain / understand if strict mode means "you have to have all of your steps passing" |
And how should we explain / understand the non-strict mode?
|
When Charlie said
I figured we were agreeing on having pending steps fail a strict build too. Did I misunderstand? |
I interpreted
as that undefined and ambiguous steps should fail the build also in non-strict mode (that is, a difference compared to the current behavior of Cucumber-Ruby and Cucumber-JVM). As far as I understand, no one have in this discussion suggested a change of the behavior of the strict mode (everything other than passed and skipped steps fail the build). |
I meant it the way @brasmusson understood it. Proposal:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Based off discussion in #442
The following was an argument for ambiguous steps to cause the test run to fail
I think this should be extended to undefined in the case that a step definition is deleted by accident or during a refactoring when it changes and a step is no longer matched. I also consider undefined and ambiguous steps similar cases as in both, cucumber-js could not find what step definition to run.
This leaves pending as the only type of step that can keep the build green in non-strict mode. That at least requires an explicit syntax and is thus less likely to happen by accident.
The text was updated successfully, but these errors were encountered: