(check sub-expression)
(check left arrow right)
Checks for an expression, using a matcher (or arrow).
check
have two APIs: one that can be used as is
, but only works for matchers or
arrows, and other that is similar to midje's fact
. To us the first version, you can
use:
; This will use the `nubank/matcher-combinators` match? to check equality
(check (=> <expected> <actual>))
; This will use the `expectations` library to check equality
(check (=expect=> <expected> <actual>))
; Or you can use the midje-like assertions
(check <actual> => <expected>)
If you want to use it to check for Javascript's promises, see check.async/check. Its usage is the same, but it'll always "await" for promises and also return promises.
Checks for an expression, using a matcher (or arrow). `check` have two APIs: one that can be used as `is`, but only works for matchers or arrows, and other that is similar to midje's `fact`. To us the first version, you can use: ```clojure ; This will use the `nubank/matcher-combinators` match? to check equality (check (=> <expected> <actual>)) ; This will use the `expectations` library to check equality (check (=expect=> <expected> <actual>)) ; Or you can use the midje-like assertions (check <actual> => <expected>) ``` If you want to use it to check for Javascript's promises, see check.async/check. Its usage is the same, but it'll always "await" for promises and also return promises.
(defmatcher name args & body)
(normalize-error error)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close