You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'm not sure i'm understanding how kaocha-cljs2 is supposed to work. I'm writing some ClojureScript library code, so it doesn't need a browser to run tests. I've managed to make a setup that builds a test bundle with shadow-cljs, with :target :node-test, adding the chui-runtime and setting autorun. So when I compile it, it opens a websocket with funnel, and start listening to run tests on demand from kaocha runtime. But I can't find a way of forcing the bundle to be recompiled when some source file changes.
Here is my configuration in shadow-cljs.edn:
{...
:builds
{:test
{:target:node-test:ns-regexp"^mylib-tests.*-test$":output-to"target/tests.cjs":output-dir"target/tests/":test-dir"target/tests" del wp y el tríptico? del wp y el tríptico? del wp y el tríptico?
:autoruntrue:runner-ns kaocha.cljs2.shadow-runner
:main kaocha.cljs2.shadow-runner/start
:preloads [lambdaisland.chui.remote]}}}
And then I can launch kaocha runner and execute tests. And if I add --watch mode, it runs the tests again if sources change, but because shadow-cljs does not trigger, the build does not change and the executed tests are the same of the previous run, I can't see the changes.
Is there any way to tell chui to watch the source files? Or to relaunch shadow-cljs on changes?
Or is there a different, better way to do all of this? Thanks.
The text was updated successfully, but these errors were encountered:
Hello. I'm not sure i'm understanding how kaocha-cljs2 is supposed to work. I'm writing some ClojureScript library code, so it doesn't need a browser to run tests. I've managed to make a setup that builds a test bundle with shadow-cljs, with
:target :node-test
, adding the chui-runtime and setting autorun. So when I compile it, it opens a websocket with funnel, and start listening to run tests on demand from kaocha runtime. But I can't find a way of forcing the bundle to be recompiled when some source file changes.Here is my configuration in
shadow-cljs.edn
:I run the build with
clojure -M:dev:shadow-cljs-kaocha compile test
with this alias in
deps.edn
:And then I start kaocha this way:
clojure -M:dev:test --watch
Also with an alias:
When shadow-cljs is run, it correctly compiles the build, load tests and opens a web socket:
And then I can launch kaocha runner and execute tests. And if I add --watch mode, it runs the tests again if sources change, but because shadow-cljs does not trigger, the build does not change and the executed tests are the same of the previous run, I can't see the changes.
Is there any way to tell chui to watch the source files? Or to relaunch shadow-cljs on changes?
Or is there a different, better way to do all of this? Thanks.
The text was updated successfully, but these errors were encountered: