cljs.test/run-block
function | since v0.0-2814 | Edit |
(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
(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)))))))