Skip to content

Commit

Permalink
Merge pull request #222 from lambdaisland/arne/dont-hide-load-error
Browse files Browse the repository at this point in the history
Don't let the "no tests found" message shadow the load error
  • Loading branch information
plexus authored May 7, 2021
2 parents 8f18bab + 9df982c commit 3d83494
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bb_deps.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:deps
{lambdaisland/open-source {:git/url "https://github.com/lambdaisland/open-source"
:sha "55f81454a62b0688a0702735257cc5473f2f0c60"
:sha "43ea822056ce84017639841ac082b9007a32d0f4"
#_#_:local/root "../open-source"}}}
4 changes: 3 additions & 1 deletion src/kaocha/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
(with-bindings (config/binding-map config)
(let [config (resolve-reporter config)]
(let [test-plan (test-plan config)]
(when-not (some hierarchy/leaf? (testable/test-seq test-plan))
(when-not (some #(or (hierarchy/leaf? %)
(::testable/load-error %))
(testable/test-seq test-plan))
(output/warn (str "No tests were found, make sure :test-paths and "
":ns-patterns are configured correctly in tests.edn."))
(throw+ {:kaocha/early-exit 0}))
Expand Down
6 changes: 2 additions & 4 deletions test/unit/kaocha/version_check_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@

(deftest current-version-does-not-throw
(is (nil? (binding [*clojure-version* {:major 1 :minor 9}]
(v/check-version-minimum 1 9)))))

(v/check-version-minimum 1 9)))))

(deftest version-2-does-not-throw
(is (nil? (binding [*clojure-version* {:major 2 :minor 0}]
(v/check-version-minimum 1 9)))))

(v/check-version-minimum 1 9)))))

0 comments on commit 3d83494

Please sign in to comment.