-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Test should fail if extra matchers are given like Should(matcher, extraMatcher1, ...) #560
Comments
Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) The issue is that the |
Can work on a PR; should having a Gomega matcher in the |
This is fixed on Master. Please feel free to reopen if necessary. |
Currently, the extra matchers given to
Should(matcher, extraMatcher1, ...)
are silently ignored and the assertion passes successfully (see the example below). This happens when a user forget (...me, actually) to wrap the matchers with SatisfyAll() or other composition matchers. The problem is that this gives the wrong impression to the user that the SUT is working correctly.It would be great if Gomega can detect this kind of incorrect usage and fail the test, notifying the user that the test should be fixed.
Example: (Gomega 1.19.0)
The text was updated successfully, but these errors were encountered: