matcher-combinators
matcher-combinators copied to clipboard
`absent` doesn't work with `any-of`
since this works:
(matcher-combinators.standalone/match?
{:a matcher-combinators.matchers/absent}
{:c 'd})
;; => true
I would expect that
(matcher-combinators.standalone/match?
{:a (matcher-combinators.matchers/any-of
'b
matcher-combinators.matchers/absent)}
{:c 'd})
;; => true
also, but actually it gives false.
Using version 3.8.5.
Hi, yes this seems to be a bug in the implementation.
absent is implemented in a sort of tricky way but I think we can try tracking when an any-of has an absent entry and change the behavior to include the option of an absent match. I'll poke around and see if I can get this rolling