Closed dchelimsky closed 1 year ago
Add a matcher that matches a non-empty sequence of elements that match a supplied matcher, e.g.
(match? (seq-of {:name string? :id uuid?}) [{:name "Michael" :id #uuid "c70e35eb-9eb6-4e3d-b5da-1f7f80932db9"}])
This impl works, but the resulting failure message leaves something to be desired:
(defn seq-of [matcher] (fn [coll] (and (seq coll) (every? (partial matcher-combinators.standalone/match? matcher) coll))))
giving it a shot in https://github.com/nubank/matcher-combinators/pull/191, what do you think?
Add a matcher that matches a non-empty sequence of elements that match a supplied matcher, e.g.
This impl works, but the resulting failure message leaves something to be desired: