This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-19
Channels
- # aleph (8)
- # announcements (43)
- # babashka (43)
- # beginners (62)
- # calva (8)
- # cider (27)
- # clj-kondo (18)
- # cljs-dev (25)
- # cljsrn (16)
- # clojure (51)
- # clojure-europe (6)
- # clojure-nl (14)
- # clojure-spec (7)
- # clojure-uk (39)
- # clojurescript (17)
- # cursive (9)
- # datascript (12)
- # datomic (16)
- # events (1)
- # fulcro (7)
- # funcool (1)
- # graalvm (2)
- # graphql (5)
- # jobs (1)
- # juxt (6)
- # kaocha (9)
- # leiningen (11)
- # luminus (1)
- # malli (1)
- # off-topic (80)
- # other-languages (2)
- # overtone (3)
- # pedestal (5)
- # quil (1)
- # re-frame (6)
- # reagent (1)
- # reitit (4)
- # rewrite-clj (5)
- # shadow-cljs (207)
- # spacemacs (1)
- # specter (4)
- # sql (1)
- # vim (14)
- # xtdb (7)
I’m struggling a little with adding directories to watch and compile in Clojure with kaocha and couldn’t find clarity on where to add this in the docs. Any example tests.edn
that shows this?
:source-paths
defaults to ["src"]
and :test-paths
to ["test"]
, so you may not need to configure anything
@plexus Alright, I don’t think I have any test suites in my tests.edn. If running kaocha with leiningen, does leiningen’s source-paths somehow interfere?
there's always at least one test suite. if you don't configure one you get a default one. This is what the default config looks like. You can always see your current actual config with kaocha --print-config
{: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]}]}
kaocha will look at source-paths and test-paths from your test suites to find which directories to watch. The test-paths will also be automatically added to the classpath, the source-paths will not, so your source paths need to be configured in your project.clj
as well (they would need to be there in any case). Beyond that leiningen's source-paths does not come into play.