Skip to content

Commit

Permalink
Fix the test subcommand for lein2 (Issue #122).
Browse files Browse the repository at this point in the history
  • Loading branch information
emezeske committed Aug 23, 2012
1 parent e2915e0 commit 9d86702
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugin/src/leiningen/cljsbuild.clj
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@
(defn- test
"Run ClojureScript tests."
[project options args]
(let [build-ids nil
compile-result (run-compiler project options build-ids false)]
(if (not= compile-result exit-code-success)
(let [compile-result (run-compiler project options nil false)]
(if (and (not lein2?) (not= compile-result exit-code-success))
compile-result
(run-tests project options args))))

Expand Down Expand Up @@ -247,9 +246,7 @@
(defn test-hook [task & args]
(skip-if-prepping task args
(apply task args)
(let [test-results (run-tests (first args) (config/extract-options (first args)) [])]
(if (not= test-results exit-code-success)
(exit-failure)))))
(run-tests (first args) (config/extract-options (first args)) [])))

(defn clean-hook [task & args]
(skip-if-prepping task args
Expand Down

0 comments on commit 9d86702

Please sign in to comment.