Spec assert macro.
Spec assert macro.
(assert-spec x spec)
(assert-spec x spec message)
Evaluates (s/assert* spec x)
and throws an exception if assertion failed.
Returns true
to be used directly in :pre/:post conditions. Thrown exception
has original spec's assert exception in a cause.
Evaluates `(s/assert* spec x)` and throws an exception if assertion failed. Returns `true` to be used directly in :pre/:post conditions. Thrown exception has original spec's assert exception in a cause.
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 |