slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
458 stars 58 forks source link

Can't set up a workflow to test cljx with speclj #116

Closed gazliddon closed 9 years ago

gazliddon commented 9 years ago

How can I set up a workflow that will test my cljx files in the testrunner?

Hiya

Thanks for making this template, I'm new to clojure, clojurescript, web programming and this has been hugely helpful for gettting me going :)

I have generated a project with chestnut to include speclj testing and cljx:

lein new chestnut --snapshot testproject --snapshot -- --cljx --speclj

What I am having some trouble with is running tests on any of my CLJX test. I can run tests fine with:

lein spec

However this does not rebuild any changes to any of my cljx files. I can solve that with:

lein do cljx, spec

Great! What I really want is for the tests to run constantly without the need ro reload the JVM. I can do that fine with:

lein spec -a

But it doesn't pick up and cljx changes and:

lein do cljx, spec -a

Doesn't work as it will only transform the cljx file once. Any help greatfully received :)

Apologies in advance if I'm missing something really obvious

gazliddon commented 9 years ago

Sorry, I should have lodged this in issues with chestnut :D

slagyr commented 9 years ago

There was a bug in cljx the caused problems. It's recently been fixed. See: https://github.com/lynaghk/cljx/issues/61

I use cljx, cljsbuild, and speclj in conjunction with great success.