Several of my projects are to the stage of benefiting from good front-end (interface/experience) testing, using Reagent as the front-end. I plan to start with the Luminus approach (http://www.luminusweb.net/docs/testing.html#clojurescript) but thought I’d check here first. What are your experiences and recommendations for front-end testing?
Not an expert at all on the tooling aspect for CLJS testing, but here are some ideas regarding the approaches:
- For testing the “logical” aspects (computations, state transitions etc.), we all know the drill: write that logic as pure function manipulating simple data. Then it’s the same story as for backend testing.
- Testing the “UX” is knowingly difficult… You could do some end-to-end tests (a Clojure REPL is great for tuning those)
- Not exactly automated testing, but do you know about devcards?
- This talk about full-stack testing in Clojure seems somewhat related
I find integration testing is really important one among others. Selenium tests are good enough to cover user’s workflows in your app.