This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-01
Channels
- # announcements (2)
- # aws (27)
- # beginners (67)
- # boot-dev (1)
- # cider (25)
- # cljs-dev (6)
- # clojure (192)
- # clojure-europe (1)
- # clojure-gamedev (1)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-russia (1)
- # clojure-spec (9)
- # clojure-uk (12)
- # clojurescript (41)
- # cursive (1)
- # datomic (22)
- # figwheel-main (4)
- # funcool (1)
- # hoplon (1)
- # kaocha (11)
- # klipse (7)
- # off-topic (1)
- # overtone (1)
- # pathom (24)
- # portkey (9)
- # re-frame (129)
- # reagent (3)
- # rum (1)
- # spacemacs (1)
- # specter (6)
Hi! I just started using Kaocha and I’ve a quick question: I would like to run some setup code (specifically (st/instrument)
) before all tests (once). As far as I can see the only way to do this is write a plugin?
I've considered adding the ability to add any plugin hooks directly in your config, so you could say #kaocha/v1 {:kaocha.hooks/pre-run [my.pre-run/function]}
, but at the moment that's not there yet.
@U07FP7QJ0 thanks to you for writing it! I am loving it so far 🙂
Configure it in tests.edn, :plugins [my.plugin/name]
, or you can add it on the command line, --plugin :my.plugin/name
. You might have to use --
as a separator between leiningen arguments and kaocha arguments, lein kaocha -- --plugin ...
I am also having an issue similar to this one: https://dev.clojure.org/jira/browse/TCHECK-113. Is there a similar work around for Kaocha?
glad you managed to fix it. In general make sure things get loaded before Kaocha kicks in, we try to override clojure.test/report at the last possible moment (and after all tests are loaded) to prevent this kind of issue.