Hey, what's a good way to expose clojure.test to SCI so that I can have some code that tests itself too?
Is this JVM or JS?
JVM
Are you producing a binary with SCI?
Yeah, uberjar with SCI that enables someone to write plugins, and hopefully test them also.
Not a binary as in CLI or native program.
You can look at babashka.impl.clojure.test and babashka.impl.test how it's integrated in babashka itself. All the calls to babashka.impl.common/ctx you can replace with sci.ctx-store/get-context
Make sure you register your context with sci.ctx-store/reset-context!
I'd be good to have this in sci.configs: https://github.com/babashka/sci.configs There is a configuration available for cljs.test but not for JVM, but this could be factored out of babashka
Nice, I wasn't aware of such a page :)
Another "library" I had some hair-pulling moments with is clojure.tools.logging
this is also in babashka. so you can have a look at how it's done there too
feature-logging/babashka/impl/logging.clj
also welcome to extract into sci.configs
it's "complected" with the taoensso.timbre config there right now
Thanks, I'll have a look,
Hmm, so how are the macros from babashka.impl.clojure.test exposed to SCI? That's something I missed. The context is defined in there but not everything is added?
> You can look at babashka.impl.clojure.test and babashka.impl.test
So those two namespaces together