-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
skipIf(Predicate) #3432
Comments
Have you tried using satisfies with a consumer implementing you specific needs ? |
Unless I'm mistaken satisfies doesn't at all do what I'm proposing with a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature summary
So the problem with the example is there isn't always a valid greater than, and I'm making up versions that I won't be generating just to fill it in. I've realized it would be nice to have a way to skip or pass a single assertion if it met certain criteria
I'd change the impossible values to null and do
Obviously I can just do an if statement or another test. Somehow to me this feels cleaner, as technically the code still executes.
BDD
given
/assumeThat
isn't the same, because I don't want to skip the entire test, I just want to not fail this 1 assertion.it'd be almost equivalent to the following, except the assertion wouldn't be called at all here, and it should be with
skipIf
could also call it
passIf
,unless
(very perl-ish). I thought of usingfilter
too but I think that'd be confusing. I suppose when thinking about chaining thoughPossibly has some additional benefit if integrating with Soft Assertions (I find "Soft" weirdly named, and didn't know they were a thing before now), as maybe they can "log" this.
note: I'm fairly confident that this comparison stuff is not the first time I've wanted this.
Example
The text was updated successfully, but these errors were encountered: