cljs.test/run-block

functionsince v0.0-2814Edit
(run-block fns)

Source docstring:
Invoke all functions in fns with no arguments. A fn can optionally
return

an async test - is invoked with a continuation running left fns

a seq of fns tagged per block - are invoked immediately after fn
Source code @ clojurescript:src/main/cljs/cljs/test.cljs
(defn run-block
  [fns]
  (when-first [f fns]
    (let [obj (f)]
      (if (async? obj)
        (obj (let [d (delay (run-block (rest fns)))]
               (fn []
                 (if (realized? d)
                   (println "WARNING: Async test called done more than one time.")
                   @d))))
        (recur (cond->> (rest fns)
                 (::block? (meta obj)) (concat obj)))))))