Kaocha cloverage plugin doesn't create reports when used with kaocha.repl/run
I have created a project below which minimally illustrates the issue. Please check it out and try running the two aliases.
https://github.com/mchughs/kaocha-cloverage-fail-example
Essentially something like -m kaocha.runner --plugin cloverage works just fine to run tests and create a report.
But trying (kaocha.repl/run 'core-test {:plugins [:kaocha.plugin/cloverage]}) will just run the test without creating a report.
My interest in having this work is that I am following Juxt's example to get parallel testing out of kaocha and CircleCI as described at https://www.juxt.pro/blog/parallel-kaocha.
They use kaocha.repl/run in their example and I obviously don't want to have to run all my tests again just to produce a coverage report since the whole point of parallelization is to speed things up.
The cloverage plugin works a little different from other plugins, it implements that main hook, which fires right before we actually run the tests. It then takes over controls, hands it over to cloverage, and lets cloverage in turn invoke Kaocha again. In the end it throws a early-exit exception to stop Kaocha from running the tests again.
This main hook is not implemented in kaocha.repl/run. It would be a little hard to do while still maintaining the contract of kaocha.repl/run.
We don't recommend the approach that Juxt describes, Kaocha is getting its own first class parallelization support instead. We encourage you to try that out. See https://github.com/lambdaisland/kaocha/pull/234
Hi, clear. I look forward to the new first class parallelization ! I'll see when it's released how it interacts with the coverage plugin