Fork me on GitHub
#kaocha
<
2019-08-19
>
plexus12:08:26

@rickmoynihan I feel like this has been discussed before, I'm open to having that configurable, so e.g. you can say

:default-suites [:unit :integration]
and have bin/kaocha without suite arguments run those two only. PR welcome. While this would make sense in core you could also do it as a plugin, so you can try it out without having to wait on anyone. Always happy to provide feedback if you decide to take a stab at this.

plexus12:08:54

@magnars I'm sorry I missed your stream, I've been in offline holiday mode the past week. Do you record/publish your streaming sessions?

jvtrigueros18:08:01

Hi all, I come from GitHub Issue 30[1], I'm having the same issue where it's saying --focus-meta is an unknown option. I've confirmed that I'm using the right version of tools.cli. This is my command, I'm running it like this for now to ensure that everything aligns

lein with-profile +test run -m kaocha.runner --focus-meta :integration
I got it running once, it was nice 🙂 [1] https://github.com/lambdaisland/kaocha/issues/30

jvtrigueros18:08:18

I was missing an argument, I had to specify the test ID 😅 The corrected command should look like:

lein with-profile +test run -m kaocha.runner --focus-meta :integration :unit

jvtrigueros20:08:30

Also, I believe the filter plugin is necessary :kaocha.plugin/filter.

plexus08:08:50

The filter plugin is always included

jvtrigueros15:08:13

That's what the documentation said but the commands above wouldn't work without me explicitly including the plugin.

plexus14:08:43

that's strange... if you have a public repo that reproduces this I'm happy to have a look

jvtrigueros15:08:15

Do I have to use the shorthand config? e.g. #kaocha/v1 {} I'll create a small example see if I can replicate this.

plexus16:08:16

yes, unless you provide a complete and normalized configuration

plexus16:08:55

the reader macro does two things, it provides default values:

{:kaocha/reporter   [kaocha.report/dots]
 :kaocha/color?     true
 :kaocha/fail-fast? false
 :kaocha/plugins    [:kaocha.plugin/randomize
                     :kaocha.plugin/filter
                     :kaocha.plugin/capture-output]
 :kaocha/tests      [{:kaocha.testable/type    :kaocha.type/clojure.test
                      :kaocha.testable/id      :unit
                      :kaocha/ns-patterns      ["-test$"]
                      :kaocha/source-paths     ["src"]
                      :kaocha/test-paths       ["test"]
                      :kaocha.filter/skip-meta [:kaocha/skip]}]}
and it normalizes/expands keywords so you can use e.g. :tests instead of :kaocha/tests.

plexus16:08:21

power users can omit #kaocha/v1 if they know what they are doing, e.g. if you don't want to use the core plugins but instead use your own version of the filter plugin. So long story short yes if you don't add the kaocha/v1 then you need to add the filter plugin yourself.

jvtrigueros19:08:02

Ah that makes much more sense, I'll add the reader macro. I'm not a power user 🙂

jvtrigueros18:08:23

Adding #kaocha/v1, made everything much better! Thanks again for your help!

plexus16:08:55

the reader macro does two things, it provides default values:

{:kaocha/reporter   [kaocha.report/dots]
 :kaocha/color?     true
 :kaocha/fail-fast? false
 :kaocha/plugins    [:kaocha.plugin/randomize
                     :kaocha.plugin/filter
                     :kaocha.plugin/capture-output]
 :kaocha/tests      [{:kaocha.testable/type    :kaocha.type/clojure.test
                      :kaocha.testable/id      :unit
                      :kaocha/ns-patterns      ["-test$"]
                      :kaocha/source-paths     ["src"]
                      :kaocha/test-paths       ["test"]
                      :kaocha.filter/skip-meta [:kaocha/skip]}]}
and it normalizes/expands keywords so you can use e.g. :tests instead of :kaocha/tests.