An API for using matcher-combinators outside the context of a test framework
An API for using matcher-combinators outside the context of a test framework
(match matcher actual)Returns a map indicating whether the actual value matches expected.
expected can be the expected value, a matcher, or a predicate fn of actual.
Return map includes the following keys:
Returns a map indicating whether the `actual` value matches `expected`. `expected` can be the expected value, a matcher, or a predicate fn of actual. Return map includes the following keys: - :match/result - either :match or :mismatch - :mismatch/detail - the actual value with mismatch annotations. - ::pretty-print! - function that pretty prints the mismatch - ::report-clojure-test! - function that reports failure to clojure.test
(match? matcher)(match? matcher actual)Given a matcher and actual, returns true if
(match matcher actual) results in a match. Else, returns false.
Given only a matcher, returns a function that will
return true or false by the same logic.
Given a `matcher` and `actual`, returns `true` if `(match matcher actual)` results in a match. Else, returns `false.` Given only a `matcher`, returns a function that will return true or false by the same logic.
(print! {pretty-print! :matcher-combinators.standalone/pretty-print!
:as _match-result})Given a match, pretty-print the mismatch data-structure
Given a `match`, pretty-print the mismatch data-structure
(report-clojure-test! {report!
:matcher-combinators.standalone/report-clojure-test!
:as _match-result})Given a match, report the result to clojure.test
Given a `match`, report the result to clojure.test
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |