From 3910df215a0d0f988163df26653a03d3e514b293 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sat, 15 Apr 2023 11:29:01 -0700 Subject: [PATCH] split test/runner to make project more jack-in friendly --- build.clj | 6 +++--- deps.edn | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.clj b/build.clj index 7f5ef31..af2d90f 100644 --- a/build.clj +++ b/build.clj @@ -55,7 +55,7 @@ [:cljs] -- test against ClojureScript" [{:keys [aliases] :as opts}] (gen-doc-tests opts) - (run-task (-> [:test :test-doc] + (run-task (-> [:test :runner :test-doc] (into aliases) (into (if (some #{:cljs} aliases) [:test-doc-cljs] @@ -63,7 +63,7 @@ opts) (defn test "Run basic tests." [opts] - (run-task [:test :1.11]) + (run-task [:test :runner :1.11]) opts) (defn- jar-opts [opts] @@ -92,7 +92,7 @@ (run-doc-tests {:aliases [alias]})) (eastwood opts) (doseq [alias aliases] - (run-task [:test alias])) + (run-task [:test :runner alias])) (b/delete {:path "target"}) (println "\nWriting pom.xml...") (b/write-pom opts) diff --git a/deps.edn b/deps.edn index 69e5ec1..19e6921 100644 --- a/deps.edn +++ b/deps.edn @@ -23,8 +23,9 @@ :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} org.clojure/core.cache {:mvn/version "RELEASE"}} - :main-opts ["-m" "cognitect.test-runner"] :exec-fn cognitect.test-runner.api/test} + :runner + {:main-opts ["-m" "cognitect.test-runner"]} ;; various "runners" for tests/CI: :cljs {:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}}