kaocha

2022-03-23T10:17:58.501899Z

Hello. I have a coverage build set up with :kaocha.plugin/cloverage and running that with bin/kaocha is working fine (produces html repl, prints out a table of results etc). If I invoke that build via (kaocha.repl/run :coverage) (ie all same opts coming from tests.edn) it just does a normal test run - no html produced etc. Is there something special one needs to do to make this or other plugins work when invoked via kaocha.repl ns?

plexus 2022-03-23T10:22:26.810199Z

You're right, that doesn't currently work. The cloverage plugin uses a custom main hook to hand over control to Cloverage. We don't currently handle that hook in kaocha.repl.

2022-03-23T10:24:40.046409Z

ok thanks

plexus 2022-03-23T10:25:53.335379Z

try something like this

(slingshot.slingshot/try+
 (kaocha.plugin.cloverage/cloverage-main-hook (kaocha.repl/config))
 (catch :kaocha/early-exit m
   (prn m)))

2022-03-23T10:38:25.425489Z

cool that runs. now just trying to see how to change that to select only the coverage test config

plexus 2022-03-23T10:39:22.076769Z

you should be able to pass the same options to config

(kaocha.repl/config :coverage)

2022-03-23T10:44:22.051089Z

looks like kaocha.repl/config takes a map of extra opts

2022-03-23T10:45:08.539709Z

I can call it with no args and filter the test suites in it to the one I want - that works

plexus 2022-03-23T11:37:45.884669Z

how about (kaocha.repl/config {:focus [:coverage]})?

2022-03-23T11:51:06.144189Z

that doesn't work - the cloverage plugin removes any suites with skip key but doesn't do any other filtering