Crossposting my question: https://clojurians.slack.com/archives/C68M60S4F/p1743867393400599
@djblue thank you but I'm not sure how I might use that information. Any suggestions?
Mind trying if this PR fixes it for you https://github.com/djblue/portal/pull/257? I would just copy the ns on your classpath, I think that should override the current one.
@djblue yes, it does indeed fix it! thanks very much!
@djblue sorry, I think there is a problem with this still. I notice that if I invoke the fulcro-spec tests directly in my REPL like so:
(in-ns (.getName *ns*))
(require 'fulcro-spec.reporters.repl)
(fulcro-spec.reporters.repl/run-tests)
the results are printed out correctly in my nvim (Conjure) REPL results window:
; (out) Running tests for: (com.example.db.sql-test)
; (out)
; (out) Testing com.example.db.sql-test
; (out) `insert` and `insert-multi!` create new records
; (out) Inserting records
; (out) pass a single map to insert one record; receive full record back
; (out) pass a vector of maps to insert multiple records
but if I invoke it using Conjure's run all tests within this namespace feature (with the Kaocha runner configured), I get raw maps as a result:
; run-ns-tests: com.example.db.sql-test
; {:type :begin-test-ns, :ns #namespace[com.example.db.sql-test]}
; {:type :begin-test-var, :var #'com.example.db.sql-test/__-insert--and--insert-multi!--create-new-records__}
; {:form-meta {:line 87}, :type :begin-specification, :string "`insert` and `insert-multi!` create new records"}
; {:type :begin-behavior, :string "Inserting records"}
; {:type :begin-behavior, :string "pass a single map to insert one record; recieve full record back"}
; {:type :pass, :expected #:foo{:bar 1}, :actual #:foo{:bar 1}, :assert-type eq, :message "(sut/insert! env :foo {:bar 1}) => #:foo{:bar 1}"}
; {:type :end-behavior, :string "pass a single map to insert one record; receive full record back"}
; {:type :begin-behavior, :string "pass a vector of maps to insert multiple records"}
and the same thing happens when using hyperfiddle tests in your namespace. It usually prints out little ✅ icons when a test passes, but with this Portal commit installed, it prints raw maps:
; (out) {:type :hyperfiddle.rcf/pass, :expected ..., :actual ..., :message nil}
and it's not just in Conjure - it prints it to my console as well, so I think we can presume it's not strictly a Conjure issue.
Sorry to jump the gun on the positive test report.I think it might be due to this spec https://github.com/djblue/portal/blob/master/src/portal/ui/viewer/test_report.cljs#L12-L53
Specifically these types: (s/def :assert/type #{:pass :fail :error})