Skip to content

Commit

Permalink
Add semi-functional version (with :parallel) as the flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
alysbrooks authored and john-shaffer committed Aug 19, 2022
1 parent 56c1dc3 commit 47627b7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/kaocha/test_suite.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
(:require [clojure.test :as t]
[kaocha.testable :as testable]))

(defn deref-recur [testables]
(cond (future? testables) (deref testables)
(vector? testables) (doall (mapv deref-recur testables))
(seq? testables) (deref-recur (into [] (doall testables)))
(contains? testables :kaocha.test-plan/tests)
(update testables :kaocha.test-plan/tests deref-recur)
(contains? testables :kaocha.result/tests)
(update testables :kaocha.result/tests deref-recur)
:else testables))

(defn run [testable test-plan]
(t/do-report {:type :begin-test-suite})
(let [results (testable/run-testables (:kaocha.test-plan/tests testable) test-plan)
Expand Down

0 comments on commit 47627b7

Please sign in to comment.