This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-24
Channels
- # announcements (4)
- # beginners (37)
- # boot (13)
- # boot-dev (3)
- # calva (122)
- # cider (16)
- # clara (13)
- # cljs-dev (3)
- # cljsrn (8)
- # clojure (311)
- # clojure-denver (1)
- # clojure-dev (14)
- # clojure-europe (7)
- # clojure-italy (36)
- # clojure-nl (3)
- # clojure-spec (11)
- # clojure-uk (77)
- # clojurescript (91)
- # core-async (10)
- # cursive (9)
- # data-science (5)
- # datomic (46)
- # devcards (2)
- # emacs (6)
- # figwheel-main (15)
- # fulcro (51)
- # jobs (3)
- # kaocha (10)
- # nrepl (6)
- # off-topic (53)
- # om (1)
- # onyx (2)
- # pathom (5)
- # reagent (50)
- # reitit (26)
- # shadow-cljs (153)
- # spacemacs (17)
- # specter (5)
- # speculative (1)
- # test-check (19)
- # tools-deps (15)
- # yada (3)
unless someone figures out how to get a CLJS repl environment that is backed by the shadow-cljs compiler, Kaocha will not work with Shadow-cljs
what's the right way to set *print-namespace-maps*
to false
for kaocha runs? using set!
doesn't work
I ended up creating my own testing
macro that generates a call to clojure.test/testing
that wraps the body in a binding
. alter-var-root
didn't seem to work either. if there's a better way, let me know
The wrap-run
hook is meant for these kind of things, but it seems the hooks plugin doesn't yet support it, so you'd have to write your own plugin.
(defplugin my.ns/my-plugin
(wrap-run [run test-plan]
(fn [& args]
(binding [...]
(apply run args)))))
I ended up with this for now:
(defmacro defscenario [scenario body]
`(clojure.test/deftest ~(symbol (clojure.string/replace scenario #" " "-"))
(binding [*print-namespace-maps* false]
~body)))