diff --git a/karma.conf.js b/karma.conf.js index d8e38754..8fc68ce4 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -6,7 +6,7 @@ module.exports = function (config) { // The file itself files: ['ci.js'], frameworks: ['cljs-test'], - reporters: ['progress', 'junit'], + reporters: ['progress'], plugins: ['karma-cljs-test', 'karma-chrome-launcher'], colors: true, logLevel: config.LOG_INFO, diff --git a/project.clj b/project.clj index a5d10894..4b0e8db6 100644 --- a/project.clj +++ b/project.clj @@ -158,6 +158,8 @@ :aliases {"all" ["with-profile" "dev,default"] "perf" ["with-profile" "default,dev,perf"] "test-clj" ["all" "do" ["bat-test"] ["check"]] + ;; NOTE: These are deprecated, kept around for ensuring shadow-cljs works + ;; the same way. "test-browser" ["doo" "chrome-headless" "test"] "test-advanced" ["doo" "chrome-headless" "advanced-test"] "test-node" ["doo" "node" "node-test"]} @@ -167,9 +169,7 @@ :output-to "target/results/reitit/junit.xml"}]} :doo {:paths {:karma "./node_modules/.bin/karma"} - :karma {:config {"plugins" ["karma-junit-reporter"] - "reporters" ["progress", "junit"] - "junitReporter" {"outputDir" "target/results/cljs"}}}} + :karma {:config {"reporters" ["progress"]}}} :cljsbuild {:builds [{:id "test" :source-paths ["src" "test/cljc" "test/cljs"] diff --git a/scripts/test.sh b/scripts/test.sh index 4ef02a81..97125daf 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -5,8 +5,13 @@ case $1 in npx shadow-cljs compile node-test node target/shadow-node-test/node-tests.js + rm -rf target/karma npx shadow-cljs compile karma npx karma start --single-run + + rm -rf target/karma + npx shadow-cljs release karma + npx karma start --single-run ;; clj) lein test-clj diff --git a/shadow-cljs.edn b/shadow-cljs.edn index 7a923072..81c7b8b6 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -1,5 +1,4 @@ {:lein {:profile "+shadow"} - ;; tests are served via http://localhost:8021 :dev-http {8021 "target/shadow-browser-test"} :builds @@ -12,6 +11,7 @@ :compiler-options {:warnings {:redef-in-file false :fn-deprecated false}}} + ;; For local dev - http://localhost:8021 :browser-test {:target :browser-test :test-dir "target/shadow-browser-test"