Fork me on GitHub
#shadow-cljs
<
2022-02-26
>
orestis14:02:30

How do people run clojure.test tests that need the context of a real browser? The guide mentions Karma plus a couple of plugins... is that still the recommended approach? In my case I'd probably use the karma playwright launcher but I was wondering about the approach in general.

Braden Shepherdson14:02:45

there's some interesting work happening with kaocha-cljs2, but I don't think it's fully ready to go yet.

orestis14:02:52

I saw that but it didn't inspire a lot of confidence - but it would be nice to also run tests from the REPL. Not sure how that works, I need to setup of PoC...

lilactown16:02:16

we've been using the same karma setup for a couple years now. work well

lilactown16:02:46

there's also the in-browser test runner when developing locally

lilactown16:02:56

it uses https://github.com/Olical/cljs-test-runner to show your tests in the browser

lilactown16:02:19

you can also, in your running app, evaluate a ns with tests in it and then call cljs.test/run-tests

lilactown16:02:32

if you'd like the REPL

thheller16:02:36

it doesn't use that at all?

lilactown19:02:48

I thought shadow-cljs did include that by default? maybe I'm totally misremembering lol

lilactown19:02:09

that is what I'm thinking of, yep