Fork me on GitHub
#shadow-cljs
<
2021-11-21
>
frozenlock19:11:59

Hello, Is there a way to use shadow-cljs to automatically run tests when files are modified? It looks possible when the target is node , but I couldn't find anything for when the target is karma or the browser.

thheller20:11:12

@frozenlock for :browser-test you just open the browser and tests run automatically. for karma you run karma, no idea how

frozenlock20:11:37

But then shadow-cljs isn't working anymore to compile new the modified cljs files, right? (Following this https://shadow-cljs.github.io/docs/UsersGuide.html#_the_build)

thheller20:11:58

you just check the watch running?

thheller20:11:24

I don't really know karma, never used it

frozenlock20:11:22

Neither did I. I'm just searching for a way to test cljs with CI 😅

lilactown22:11:52

the way I run our tests in ci:

shadow-cljs compile ci # compile the tests from CLJS to JS
npx karma start --single-run
this happens anytime a push to a branch occurs

lilactown22:11:04

if you're running them locally, you can run shadow-cljs watch ci and then tell karma to watch for file changes.

frozenlock21:11:45

Thank you very much!