kaocha 2022-11-18

Making a note to myself — reminder to study the documentation, and if this isn’t already sufficiently documented, file an issue or pull request: “`--plugin kaocha.plugin/profiling` does not work when using --watch — I was expecting this to work, hoping that I could find all the tests that need to be flagged with meta of :integration. Instead, profiling information never appeared.” Thank you to everyone who makes kaocha so awesome! I use it in (almost) all my projects!

Please do file an issue @genekim, I don't think I've seen anyone mention this one yet but it sounds like something that "should" work. If it's surprising to you it's probably surprising to someone else, and we should at least look at what our options are to improve/ or fix it.

👍 1
🙏 1

I have a quick question, I get the following error when trying to run kaocha with the cloverage plugin

ERROR: Couldn't load plugin kaocha.plugin/cloverage. Failed to load namespace cloverage. This could be caused by a misspelling or a missing dependency.

:test {:extra-paths ["backend/dev-resources"]
                  :extra-deps {lambdaisland/kaocha {:mvn/version "1.68.1059"}
                               lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}}
                  :exec-fn kaocha.runner/exec-fn}

           :kaocha-coverage {:exec-fn kaocha.runner/exec-fn
                             :exec-args {:plugins [kaocha.plugin/cloverage]
                                         :cloverage/opts {:ns-exclude-regex [],
                                                          :text? false,
                                                          :lcov? false,
                                                          :high-watermark 80,
                                                          :fail-threshold 0,
                                                          :output "target/coverage",
                                                          :low-watermark 50,
                                                          :ns-regex [],
                                                          :summary? true,
                                                          :coveralls? false,
                                                          :emma-xml? false,
                                                          :html? true,
                                                          :nop? false,
                                                          :codecov? false}}}

i have this config in my deps.edn

and run it with: clojure -A:test -X:kaocha-coverage

not sure but try making the plugin name a keyword

:plugins [:kaocha.plugin/cloverage]

thx @plexus , the issue was, we have a dedicated tests.edn in the project, so I added the config part there and everything is working now! (and I had to use a keyword 🤣 )