Provides just a bit more convenient functionality to clojure.spec.
Provides just a bit more convenient functionality to clojure.spec.
Predefined specs and generators which are popular in real production.
Predefined specs and generators which are popular in real production.
Provides an assert expression, valid?, to validate a value with a spec in clojure.test, which outputs an explanation upon test failure.
(s/def :int/pos (s/and integer? pos?))
(is (valid? :int/pos -1)) ;; FAIL in () (NO_SOURCE_FILE:xx) ;; expected: (valid? :int/pos -1) ;; actual: -1 - failed: pos? spec: :int/pos ;;=> nil
Provides an assert expression, valid?, to validate a value with a spec in clojure.test, which outputs an explanation upon test failure. (s/def :int/pos (s/and integer? pos?)) (is (valid? :int/pos -1)) ;; FAIL in () (NO_SOURCE_FILE:xx) ;; expected: (valid? :int/pos -1) ;; actual: -1 - failed: pos? spec: :int/pos ;;=> nil
No vars found in this namespace.
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 |