nbb

2024-06-25T13:53:16.014599Z

Haven't pinned down what's preventing the testing macro from working as expected

2024-06-25T14:09:52.147209Z

New theory: Maybe this new-env function is firing but testing-contexts is not being referenced?

2024-06-25T14:19:12.168569Z

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