Fork me on GitHub
#shadow-cljs
<
2019-07-11
>
donavan09:07:10

Hi, we have a pure cljs project built with shadow-cljs that has a need for headless browser based integration tests. We normally use https://github.com/igrishaev/etaoin for this but after reading the manual I can't see an obvious way of writing the tests in clj. Has anyone done this before? I'd rather avoid bringing in another build tool for this.

polymeris09:07:26

You mean writing them in cljs? I don't think that's possible with etaoin. You'd have to switch to something JS-based, e.g. cypress

polymeris09:07:10

Or did you mean that you want shadow-cljs to run clj?

polymeris09:07:59

shadow-cljs clj-run could help

donavan10:07:56

The latter. I would probably just use boot to run the clj tests before trying to do it myself with clj-run. I was just wondering if there was a simple solution I was missing with shadow-cljs

thheller14:07:31

clj-run is that simple solution. you just create a clojure function in some namespace and call that using clj-run

thheller14:07:51

but shadow-cljs is focused on CLJS so running CLJ stuff might be better served using boot or so

fbielejec11:07:32

Hi, I wrote a small post on using shadow to target (vanilla) react-native codebase and run it on an iOS simulator in Linux (using vbox) https://www.blog.nodrama.io/react-native-xcode-linux/ There is an accompanying repository here: https://github.com/fbielejec/shadow-cljs-react-native The resulting workflow is quite snappy and non-obtrusive - hopefully someone can find it useful.

👍 1