Repository navigation
Add Expect.oneOf - #126
Add Expect.oneOf#126
Conversation
| [] -> | ||
| Test.Expectation.fail | ||
| { reason = Invalid EmptyList | ||
| , description = "Expect.oneOf ran out of expectations." |
There was a problem hiding this comment.
I think the feedback should be a lot more informative. This doesn't tell you at all how to fix your test.
There was a problem hiding this comment.
@gampleman could you please help provide a solution for that? Would it need to keep track of why all expectations failed and print that?
There was a problem hiding this comment.
Although perhaps in a more condensed format? I think there's some experimentation to be done on this.
16a8dff to
2f8b904
Compare
|
Needed a new (I've cleaned things up a little bit; one of the other breaking changes is simplifying |
This PR adds the
Expect.oneOffunction. This function works similarly toExpect.all, but results in a pass if at least one of the subjects passes the check. If all subjects fail the check it returns a fail.I think the implementation should be okay (I had implemented the same function in my codebase, but without the usage of the internal types). I'm not sure about the tests because I'm having a hard time running the repository tests locally.
Any feedback would be appreciated!