Fork me on GitHub
#figwheel-main
<
2019-08-21
>
kah0ona11:08:45

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

4
athomasoriginal02:08:22

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

kah0ona11:08:37

an example would be nice, for circleCI in my case

mauricio.szabo14:08:38

@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.

kah0ona14:08:44

aah thanks!

mauricio.szabo14:08:45

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 🙂

folcon16:08:56

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.szabo16:08:23

@U0JUM502E auto-test is a library?

folcon16:08:40

no it’s a option in figwheel-main

folcon16:08:16

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

😊 4
mauricio.szabo16:08:56

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

folcon16:08:13

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

folcon16:08:03

btw @U3Y18N0UC are you running devcards via :extra-main-files?

mauricio.szabo16:08:25

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

folcon16:08:59

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