Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running 'lein test' without compiling ClojureScript

I have client-server app (backend in Clojure+ring, frontend done with ClojureScript) and there are unit tests, but only for backend.

Each time when I run 'lein test' lein have to compile ClojureScript, because ':hook [leiningen.cljsbuild]' is set in project.clj.

Can I somehow run tests without ClojureScript recompilation?

like image 340
ndrw Avatar asked Jan 11 '13 10:01

ndrw


1 Answers

cljsbuild provide next hooks:

  • compile
  • test
  • clean
  • jar

You can't remove/deactivate one of this hooks and use others. I suggest you don't use :hooks [leiningen.cljsbuild] at all. Just declare :aliases for doing actions that you need: i.e. compile should run both compile and cljsbuild once (you can do this with do statement in aliases, see sample project for more information).

like image 92
Alexey Kachayev Avatar answered Oct 19 '22 19:10

Alexey Kachayev