From d4f827e0d6cc7e65e9db49882cdfda2c81f9fd99 Mon Sep 17 00:00:00 2001 From: Andrea Crotti Date: Tue, 24 Nov 2020 09:47:56 +0000 Subject: [PATCH 1/3] update deps and add edn file --- project.clj | 9 +++++---- tests.edn | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/project.clj b/project.clj index 7df7f3c..bdbf95e 100644 --- a/project.clj +++ b/project.clj @@ -89,7 +89,7 @@ :uberjar-name "byf.jar" :min-lein-version "2.8.1" :source-paths ["src/cljc" "src/clj" "src/cljs"] - :test-paths ["test/clj" "test/cljc"] + :test-paths ["test/clj" "test/cljc" "test/cljs"] :ring {:handler byf.api/app} :resource-paths ["resources"] @@ -111,9 +111,10 @@ checking [[:inner 0]]}} :profiles - {:kaocha {:dependencies [[lambdaisland/kaocha "0.0-541"] - [lambdaisland/kaocha-cloverage "0.0-32"] - [lambdaisland/kaocha-junit-xml "0.0-70"]]} + {:kaocha {:dependencies [[lambdaisland/kaocha "1.0.700"] + [lambdaisland/kaocha-cloverage "1.0.75"] + [lambdaisland/kaocha-junit-xml "0.0.76"] + [lambdaisland/kaocha-cljs "0.0-71"]]} :uberjar {:hooks [] :source-paths ["src/clj" "src/cljc"] :prep-tasks [["compile"] diff --git a/tests.edn b/tests.edn index ed056e9..c743785 100644 --- a/tests.edn +++ b/tests.edn @@ -1,3 +1,16 @@ #kaocha/v1 -{:capture-output? true - :color? true} +{:capture-output? false + :color? true + :tests [[:id :clj + :type :kaocha.type/clojure.test + :test-paths ["test/cljc" "test/clj"]] + + {:id :cljs + :type :kaocha.type/cljs + :launch-browser false + :launch-command ["google-chrome-stable" "http://localhost:9000"] + :test-paths ["test/cljs" "test/cljc"] + ;; :cljs/timeout 10000 ; 10 seconds, the default + ;; :cljs/repl-env cljs.repl.node/repl-env ; node is the default + :cljs/repl-env cljs.repl.browser/repl-env + }]} From 1705f36d31e796caf83a376615d1dd47693861db Mon Sep 17 00:00:00 2001 From: Andrea Crotti Date: Wed, 9 Dec 2020 11:56:25 +0000 Subject: [PATCH 2/3] no need for runner file --- test/cljs/byf/runner.cljs | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 test/cljs/byf/runner.cljs diff --git a/test/cljs/byf/runner.cljs b/test/cljs/byf/runner.cljs deleted file mode 100644 index 2feb024..0000000 --- a/test/cljs/byf/runner.cljs +++ /dev/null @@ -1,11 +0,0 @@ -(ns byf.runner - (:require [doo.runner :refer-macros [doo-tests]] - [byf.algorithms.elo-test] - [byf.rankings-test] - [byf.stats-test] - [byf.games-test])) - -(doo-tests 'byf.algorithms.elo-test - 'byf.rankings-test - 'byf.stats-test - 'byf.games-test) From f7238e730d359676364878f056ff8ca10991e251 Mon Sep 17 00:00:00 2001 From: Andrea Crotti Date: Wed, 9 Dec 2020 12:06:28 +0000 Subject: [PATCH 3/3] move kaocha to dev deps --- project.clj | 24 ++++++++---------------- tests.edn | 10 +++++----- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/project.clj b/project.clj index bdbf95e..0273288 100644 --- a/project.clj +++ b/project.clj @@ -76,7 +76,6 @@ :plugins [[lein-environ "1.1.0"] [migratus-lein "0.5.0"] - [lein-doo "0.1.6"] [lein-cljsbuild "1.1.4"] [jonase/eastwood "0.3.3"] [lein-ring "0.9.7"] @@ -102,8 +101,7 @@ :aliases {"fig" ["trampoline" "run" "-m" "figwheel.main"] "fig:build" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev"] "cljs-prod" ["run" "-m" "figwheel.main" "--build-once" "prod"] - "test-cljs" ["doo" "rhino" "test" "once"] - "kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"] + "kaocha" ["run" "-m" "kaocha.runner"] "seed" ["run" "-m" "byf.seed"]} :cljfmt {:indents {for-all [[:block 1]] @@ -111,11 +109,7 @@ checking [[:inner 0]]}} :profiles - {:kaocha {:dependencies [[lambdaisland/kaocha "1.0.700"] - [lambdaisland/kaocha-cloverage "1.0.75"] - [lambdaisland/kaocha-junit-xml "0.0.76"] - [lambdaisland/kaocha-cljs "0.0-71"]]} - :uberjar {:hooks [] + {:uberjar {:hooks [] :source-paths ["src/clj" "src/cljc"] :prep-tasks [["compile"] ["cljsbuild" "once" "min"]] @@ -135,7 +129,11 @@ :env {:environment :dev} - :dependencies [[binaryage/devtools "0.9.10"] + :dependencies [[lambdaisland/kaocha "1.0.700"] + [lambdaisland/kaocha-cloverage "1.0.75"] + [lambdaisland/kaocha-junit-xml "0.0.76"] + [lambdaisland/kaocha-cljs "0.0-71"] + [binaryage/devtools "0.9.10"] [cider/piggieback "0.4.1"] [org.mozilla/rhino "1.7.11"] [day8.re-frame/re-frame-10x "0.4.3"] @@ -144,13 +142,7 @@ [ring/ring-mock "0.4.0"]]}} :cljsbuild {:builds - [{:id "test" - :source-paths ["src/cljs" "src/cljc" "test/cljs" "test/cljc"] - :compiler {:output-to "target/unit-test.js" - :main 'byf.runner - :optimizations :whitespace}} - - {:id "min" + [{:id "min" :source-paths ["src/cljs" "src/cljc"] :compiler {:main byf.core :output-to "resources/public/cljs-out/dev-main.js" diff --git a/tests.edn b/tests.edn index c743785..70cc703 100644 --- a/tests.edn +++ b/tests.edn @@ -1,16 +1,16 @@ #kaocha/v1 {:capture-output? false :color? true - :tests [[:id :clj + :tests [{:id :clj :type :kaocha.type/clojure.test - :test-paths ["test/cljc" "test/clj"]] + :test-paths ["test/cljc" "test/clj"]} {:id :cljs :type :kaocha.type/cljs - :launch-browser false - :launch-command ["google-chrome-stable" "http://localhost:9000"] + ;; :launch-browser false + :launch-command ["google-chrome-stable" "http://localhost:3335"] :test-paths ["test/cljs" "test/cljc"] ;; :cljs/timeout 10000 ; 10 seconds, the default ;; :cljs/repl-env cljs.repl.node/repl-env ; node is the default - :cljs/repl-env cljs.repl.browser/repl-env + :cljs/repl-env figwheel.repl/repl-env }]}