cljs.test/test-all-vars-block
(test-all-vars-block [quote ns])
(defmacro test-all-vars-block
([[quote ns]]
`(let [env# (get-current-env)]
(concat
[(fn []
(when (nil? env#)
(set-env! (empty-env)))
~(when (ana-api/ns-resolve ns 'cljs-test-once-fixtures)
`(update-current-env! [:once-fixtures] assoc '~ns
~(symbol (name ns) "cljs-test-once-fixtures")))
~(when (ana-api/ns-resolve ns 'cljs-test-each-fixtures)
`(update-current-env! [:each-fixtures] assoc '~ns
~(symbol (name ns) "cljs-test-each-fixtures"))))]
(test-vars-block
[~@(->> (ana-api/ns-interns ns)
(filter (fn [[_ v]] (:test v)))
(sort-by (fn [[_ v]] (:line v)))
(map (fn [[k _]]
`(var ~(symbol (name ns) (name k))))))])
[(fn []
(when (nil? env#)
(clear-env!)))]))))