Liking cljdoc? Tell your friends :D

more.spec.alpha

Provides just a bit more convenient functionality to clojure.spec.

Provides just a bit more convenient functionality to clojure.spec.
raw docstring

more.spec.alpha.specs

Predefined specs and generators which are popular in real production.

Predefined specs and generators which are popular in real production.
raw docstring

more.spec.alpha.test

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
raw docstring

No vars found in this namespace.

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close