gocrest icon indicating copy to clipboard operation
gocrest copied to clipboard

Describe only failed matchers in AnyOf

Open corbym opened this issue 4 years ago • 1 comments

AnyOf reports all matcher's descriptions when it fails.

Given a number of matchers, when less than all of them fail, we should only report the description of the failing matchers.

corbym avatar Dec 15 '20 08:12 corbym

Would be a nice feature, because if I understand right the description has to be changed based on the childMatchers' .Matches result.

Enabling this would make possible to write better descriptions/actuals in general

jpolack avatar Dec 17 '20 16:12 jpolack

not sure what I was thinking here, cause it makes no sense for anyOf to fail matching less than all - its criteria is to match ANY of the matchers and pass. I must have meant AllOf..

corbym avatar Mar 15 '23 10:03 corbym