This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-25
Channels
- # aws (6)
- # babashka (4)
- # beginners (30)
- # calva (82)
- # clj-kondo (8)
- # clojure (65)
- # clojure-brasil (1)
- # clojure-denmark (1)
- # clojure-europe (23)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-norway (112)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (13)
- # cursive (3)
- # datahike (7)
- # datomic (5)
- # events (1)
- # fulcro (17)
- # instaparse (3)
- # introduce-yourself (2)
- # lsp (4)
- # malli (18)
- # nbb (5)
- # off-topic (46)
- # pedestal (4)
- # polylith (20)
- # practicalli (4)
- # reitit (4)
- # releases (1)
- # rewrite-clj (11)
- # sql (28)
https://github.com/babashka/sci.configs/blob/ffa88d796a3a2fe0a0fce332c6bf56f36b7c5cd7/src/sci/configs/cljs/test.cljs#L715 my immediate hypothesis is that's not working
New theory: Maybe this new-env function is firing but testing-contexts is not being referenced?
I think that might be it. I replaced the fail reporter with:
(defmethod t/report [:cljs.test/default :fail] [m]:bulb:
(t/inc-report-counter! :fail)
(inc-var-count! :fail)
(println "\nFAIL in" (t/testing-vars-str m))
(println "testing contexts" t/*testing-contexts*)
(when (seq (:testing-contexts (t/get-current-env)))
(println (t/testing-contexts-str)))
(when-let [message (:message m)] (println message))
(print-comparison m))
The output:
FAIL in (basic-test) (:47)
testing contexts (Will this work? Can test with promise)
expected: (= x 3)
actual: (not (= 2 3))
Looks like the empty-env
is initializing testing-contexts to an empty list, but the testing macro is operating on the dynamic *testing-contexts*
var