cljs.test/test-ns-block
(test-ns-block env [quote ns :as form])
Source docstring:
Like test-ns, but returns a block for further composition and
later execution. Does not clear the current env.
(defmacro test-ns-block
([env [quote ns :as form]]
(assert (and (= quote 'quote) (symbol? ns)) "Argument to test-ns must be a quoted symbol")
(assert (ana-api/find-ns ns) (str "Namespace " ns " does not exist"))
`[(fn []
(set-env! ~env)
(do-report {:type :begin-test-ns, :ns ~form})
~(if-let [v (ana-api/ns-resolve ns 'test-ns-hook)]
`(~(symbol (name ns) "test-ns-hook"))
`(block (test-all-vars-block ~form))))
(fn []
(do-report {:type :end-test-ns, :ns ~form}))]))