cljs.spec.test/check-var

functionremoved v1.9.183added v1.9.14Edit
(check-var v & opts)

Source docstring:
Checks a var's specs using test.check. Optional args are
passed through to test.check/quick-check:

  num-tests     number of tests to run, default 100
  seed          random seed
  max-size      how large an input to generate, max 200
  reporter-fn   reporting fn

Returns a map as quick-check, with :explain-data added if
:result is false.
Source code @ clojurescript:src/main/cljs/cljs/spec/test.cljs
(defn check-var
  [v & opts]
  (let [fnspec (spec/get-spec v)]
    (if (:args fnspec)
      (apply check-fn @v fnspec opts)
      (throw (js/Error. (str  "No :args spec for " v))))))