MK
Т.е. в проекте есть код и на cljs и на js. При этом оба используют closure модули и в js можно подключить cljs.core.
Как минимум это может быть нужно для async/await.
Size: a a a
MK
AC
AC
AC
AC
AC
MK
a
MK
MK
АБ
D
AC
IG
pprint
доступна в repl без подгрузки пакета clojure.pprint
?IG
user
a
pprint
доступна в repl без подгрузки пакета clojure.pprint
?IG
MB
(def ^:dynamic *config*)
(def ^:dynamic *my-flag*)
(use-fixtures :each
(fn [test-fn]
(binding [*config* (mock MyProtocol {:a (if *my-flag* 1 (throws Exception 2))})]
(test-fn))))
(deftest foo
(binding [*my-flag* false]
(do-test)))
===========================================
def ^:dynamic *config*)
(use-fixtures :each
(fn [test-fn]
(let [my-flag (:my-flag (get-test-meta test-fn))]
(binding [*config* (stub MyProtocol {:a (if my-flag 1 (throws Exception 2))})]
(test-fn)))))
(deftest ^{:my-flag false} foo
(do-test))
IG