This commit is contained in:
Juho Teperi 2025-01-22 13:36:59 +02:00
parent b19dda8d5d
commit b1d066246a
4 changed files with 10 additions and 5 deletions

View file

@ -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,

View file

@ -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"]

View file

@ -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

View file

@ -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"