figwheel-main

figwheel-main http://figwheel.org
kah0ona 2019-08-21T11:08:45.044400Z

Hello, I want to run my tests from circleCI, what environment is recommended? I have a bog standard figwheel-main project, but lein fig:test launches a browser. I read about using headless Chrome, but on my macbook it doesn’t seem to terminate. Ideally i get a non zero exit code if the tests fail

1
athomasoriginal 2019-08-23T02:58:22.055Z

Have you tried JSDOM? That is how I run my headless tests 🙂 I don’t have an example ATM (stay tuned though)

kah0ona 2019-08-21T11:09:37.044700Z

an example would be nice, for circleCI in my case

kah0ona 2019-08-21T13:10:02.045500Z

i switched to use https://github.com/Olical/cljs-test-runner

kah0ona 2019-08-21T13:10:05.045800Z

for CI

kah0ona 2019-08-21T13:10:06.046Z

thx

mauricio.szabo 2019-08-21T14:36:38.048900Z

@kah0ona I had a very similar problem with a project I'm writing now. I wrote a little bit on my blog: https://mauricio.szabo.link/blog/2019/08/21/complex-testing-the-saga/ TL;DR; I wrote a simple node.js script that collects the links of devcards (the library I'm using to test) and made CircleCI run that node project, collecting test results, and printing on the console the progress.

kah0ona 2019-08-21T14:39:44.049200Z

aah thanks!

mauricio.szabo 2019-08-21T14:43:45.051100Z

My project uses Electron as a test environment, but I think the node.js script that collects the tests can be used with any Chromium-based browser too 🙂

2019-08-21T16:08:56.052500Z

I’ve been trying to get auto-testing and devcards to work in figwheel main, but it’s very much seeming to be one things breaks or the other… Anyone had any luck with getting it all working together or knows of a good example to point me to?

mauricio.szabo 2019-08-21T16:12:23.052800Z

@folcon auto-test is a library?

2019-08-21T16:12:40.053Z

no it’s a option in figwheel-main

2019-08-21T16:14:16.053600Z

sorry, auto-testing, I’ve adjusted the original message…

😊 1
mauricio.szabo 2019-08-21T16:15:56.054Z

Ah, ok, I'm not that familiar with figwheel-main. Well, for me the problem was that devcards by default runs async tests in parallel, so when I tried to run all in one place they would interfere one with another

2019-08-21T16:17:13.054200Z

Oh? Hmm, so just run devcards? I’ll give that a go.

2019-08-21T16:18:03.054400Z

btw @mauricio.szabo are you running devcards via :extra-main-files?

mauricio.szabo 2019-08-21T16:20:25.054600Z

No, I'm using shadow-cljs so the configs are kinda different. Also, the project that I had the problem is a cljs library, so my "main file" was the entrypoint for devcards

2019-08-21T16:21:59.054800Z

Ok, somewhat different experiences then, even getting figwheel-main to work with devcards is a bit of a battle…