Fork me on GitHub
#calva
<
2019-12-11
>
Filipe Silva17:12:57

so every now and then the topic of cljs test support in calva comes up

Filipe Silva17:12:06

right now it doesn't quite work

Filipe Silva17:12:30

calva has some nice features for clj like "run this test" and "run all tests in the namespace"

Filipe Silva17:12:00

I don't quite remember the particulars of why running cljs tests in Calva was hard, but I remember it just was

Filipe Silva17:12:30

it's a test runner for clj and cljs

Filipe Silva17:12:05

one thing stood out while looking at why kaocha doesn't quite work with shadow-cljs atm (https://github.com/lambdaisland/kaocha-cljs/issues/2)

Filipe Silva17:12:17

> Kaocha works differently from most ClojureScript test runners in that it works against a REPL backend, rather than first compiling a single big JS blob and running that. This is quite deliberate, because of the dynamic nature of Kaocha. We send commands to the REPL to start tests one by one, then use a websocket to send `cljs.test` events back to Kaocha and route them to the kaocha reporter.

Filipe Silva17:12:34

this looks like a great fit for tooling like Calva

Filipe Silva17:12:26

makes me wonder if Kaocha usage could enable cljs testing in calva

plexus17:12:23

Kaocha is written with tooling in mind, have a look at the kaocha.api and kaocha.repl namespaces for this, also https://github.com/liquidz/kaocha-nrepl

pez18:12:08

Cool. I've been planning to check out Kaocha for a while now. Great if it can help with the cljs story.

plexus19:12:37

Feel free to ping me if you have specific questions or need an example of how to do a specific thing

pez20:12:21

I will.