Proposal: Add command to autogenerate tests.edn
The easiest way to do this is just to create a very simple tests.edn like the following. This file is trivial, so we're not saving a ton of work, but the convenience might still make it easier for new users:
#kaocha/v1 {}
We could also use the catch-all configuration:
#kaocha/v1
{:tests [{:id :unit
:test-paths ["test" "src"]
:ns-patterns [".*"]}]
;; :reporter kaocha.report.progress/report
;; :plugins [:kaocha.plugin/profiling :kaocha.plugin/notifier]
}
We could try to be slightly smarter about which configuration by using a multistep approach:
- Generate the bare-bones file.
- Run Kaocha's test gathering using the bare-bones file.
- If no tests are found, prompt user to ask whether they want the catch-all.
- If so, run Kaocha's test gathering using the catch-all
- Report results.
A more complicated but still doable approach would be to search the project to identify folders that contain namespaces with "test" in the name or that require the clojure.test namespace.
Along similar lines, neil adds an alias to deps.edn.
I think we want to direct our focus on improving ergonomics toward making it easier to get started with kaocha-cljs2. A PR for this would be great, though.