I didn't make any changes moving from 11 to 24, so should be easy to move 😉
not like 8->11, which wasn't hard either to be fair, just broke a lot of stuff
just released 3.0.4 with a new cljs version because of a bug in cljs. consider updating if you are on 3.x
I seem to have found a bug with the :karma build target reporting failures when nil is passed to is. Repro: https://github.com/lilactown/is-nil-bug
Essential details:
(ns town.lilac.is-nil-test
(:require
[cljs.test :refer [deftest is]]))
(deftest is-nil
(is nil))
when run with shadow-cljs compile test && npx karma start --single-run
results in
TypeError: Cannot read properties of null (reading 'hasOwnProperty')
at shadow$test$karma$format_log (ci.js:63192:41)
at ci.js:25451:89
at ci.js:25452:3
at Object.sval (ci.js:19297:110)
at Object.cljs$core$ISeqable$_seq$arity$1 (ci.js:19448:10)
at Object.cljs$core$seq [as seq] (ci.js:12341:13)
at ci.js:25425:36
at Object.sval (ci.js:19297:110)
at Object.cljs$core$ISeqable$_seq$arity$1 (ci.js:19448:10)
at Object.cljs$core$seq [as seq] (ci.js:12341:13)does that still happen if you have
(deftest is-nil
(is (produces-nil))I mean its kinda weird to have (is nil)?
since I'm not going to make any more 2.28 releases, you can take this file https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/test/karma.cljs and put it on your own classpath
modify it however you need. it'll be used over the version in shadow-cljs
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/test/karma.cljs#L59
thats the problem I guess
yes, I tried to give a minimal example but you can do (is (:x {})) and it produces the same error
looks like this line is causing the error: https://github.com/thheller/shadow-cljs/blob/bcc7c6d9b039ec41b488e4f367b20ca79ae3d903/src/main/shadow/test/karma.cljs#L59
Is there a way to configure the ns that the :karma build uses to start?
oh probably in the karma.conf.js
ah but it isn't compiled automatically
:runner-ns in the build config, shadow never looks at karma.conf.js
right, I think updating both those places fixed it!
FYI I just changed the line to
(and (some? actual) (.hasOwnProperty actual "stack"))For some reason in our main app repo, the test runner hangs until it disconnects. Here it seems to fail with an error. My hunch is it's related. Note: I'm stuck on 2.28 until we can upgrade our Java beyond version 11