kaocha-cljs
kaocha-cljs copied to clipboard
Dynamic classpath handling does not work
Kaocha adds any :test-paths
to the classpath, so you don't have to, and so that only suites that are being run get added. However ClojureScript does not seem to pick up on this, so you need to add your test directories to the classpath yourself (e.g. in tools.deps with :paths
or leiningen :test-paths
).
Would be good to figure out what ClojureScript needs to make this work.
Related: #4
/cc @urzds
@plexus: We ran into this issue when taking our first steps at writing tests for our UI. Would it be possible to document this behaviour? Especially since this is not necessary for Clojure tests it took us a while to figure out what is wrong.
Sure, a PR for the README would be most welcome!
@plexus Isn't the readme already up to date on this issue?
[...]
## Known issues
- The :test-paths do not get automatically added to the classpath (at least not in a way that makes the sources visible to ClojureScript), so you need to also have any :test-paths in your project.clj/deps.edn/build.boot.
[...]
Right, makes sense that this was already documented. The original ticket was about figuring out if we can make it work on ClojureScript too. This could in theory still be investigated, but it's not something I want us to spend time on. Why? Because hacking the classpath like this is always hacky, and easily introduces new issues, or lead to suprising behavior. Let the tools that are designed to manage the classpath manage the classpath.
I think we have many other things to spend our time on that will have a greater positive impact for users.
So, until further notice I'm going to close this as "wontfix".