Don't blow up when test eval-in-project doesn't return a number.
Hopefully only an issue when using :eval-in-leiningen.
This commit is contained in:
parent
4f4e66e01b
commit
d54f82695e
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ specified test. A default :all test-selector is available to run all tests."
|
||||||
form (form-for-testing-namespaces nses nil (vec selectors))]
|
form (form-for-testing-namespaces nses nil (vec selectors))]
|
||||||
(try (when-let [n (eval/eval-in-project project form
|
(try (when-let [n (eval/eval-in-project project form
|
||||||
'(require 'clojure.test))]
|
'(require 'clojure.test))]
|
||||||
(when (pos? n)
|
(when (and (number? n) (pos? n))
|
||||||
(throw (ex-info "Tests Failed" {:exit-code n}))))
|
(throw (ex-info "Tests Failed" {:exit-code n}))))
|
||||||
(catch clojure.lang.ExceptionInfo e
|
(catch clojure.lang.ExceptionInfo e
|
||||||
(main/abort "Tests failed."))))))
|
(main/abort "Tests failed."))))))
|
Loading…
Reference in a new issue