test

functionsince v0.0-2496 clojure.core/testEdit
(test v)

Source docstring:
test [v] - if var, finds fn at key :test in var metadata, if function, finds
special test property. Calls it, presuming failure will throw exception.

Examples:

(test my-fn) ;; :ok
(test #'my-fn) ;; :ok
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn test
  [v]
  (let [f (if (instance? Var v)
            (-> v meta :test)
            (some-> v .-cljs$lang$test))]
    (if f
      (do (f) :ok)
      :no-test)))