Fork me on GitHub
#kaocha
<
2021-08-31
>
ingesol09:08:35

Hi! We are users of kaocha-cljs2, and find it to be a great experience. I was just wondering: Since the different concerns are so well separated, is it possible to use chui as a UI for running JVM-tests? Would it just be a matter of writing a WS-client that sends results to funnel, or are there parts on the chui side that are not compatible?

plexus09:08:02

Hey, super happy to hear you're happy with kaocha-cljs2. I'm not sure many people have made the effort. What company are you at? Yes, using Chui as a general kaocha UI should be possible, it's just a matter of inserting state into chui's atom. The devil is in the details, like making sure specific kinds of assertions are rendered properly.

ingesol09:08:25

Not sure I’m allowed to disclose my company, but will do after asking 🙂 The docs stated the setup is more complex, but I was surprised to find that with shadow-cljs a very minor config was needed, and no funnel. I launched funnel at first, but killing the funnel process made no difference in functionality.

ingesol10:08:53

Looking at my current config, only changes are :extra-deps on kaocha-cljs2 and chui, and switching the runner-ns in the shadow test build.

ingesol10:08:06

I suppose not too many people are interested in something like chui for JVM-tests then.

plexus10:08:23

> no funnel that's not possible 🙂 either the funnel process is still running in the background, or there's an embedded funnel running in one of the JVMs. We don't have a way for kaocha to communicate with the JS environment without funnel.

plexus10:08:11

> I suppose not too many people are interested in something like chui for JVM-tests then. People will accept very bare-bones tooling until they've seen something better (and sometimes prefer because of fewer moving pieces)

ingesol10:08:50

Not possible without funnel? I thought so too, then this is interesting 🙂 I just tried the following: • Rebooted my mac • Launched my shadow-cljs test build. • Opened chrome with http://localhost:8021/ • Shows my tests passing • Change a test file to fail a test • Reload happens, test suite is run and the correct test is failing

plexus11:08:20

it sounds like you're just using Chui and not kaocha-cljs2

ingesol11:08:08

In fact you are probably right. I’m building tests with shadow-cljs :browser-test target, and using :runner-ns lambdaisland.chui.shadow.browser-runner

ingesol11:08:42

are you saying i could remove my dependency on kaocha-cljs2, and leave only chui, and things would work the same?

ingesol12:08:21

Sorry for the confusion, I thought kaocha-cljs2 was doing something there, but maybe not

plexus12:08:50

yes, if you simply want a browser UI over cljs tests then Chui is enough. Kaocha-cljs2 is when you want to run this on the command line and/or combine with kaocha plugins or other kaocha features (filtering etc)

ingesol12:08:58

ahh, my bad. Then my original feedback can be corrected to “I’m using chui, and I’m happy about it” 🙂

❤️ 2