Fork me on GitHub
#shadow-cljs
<
2023-12-01
>
floscr20:12:17

Is there a way to pretty print output in :node-test terminal output? For this config:

:node-test {:target :node-test
                      :output-to "out/node-tests.js"
                      :ns-regexp "-test$"
                      :autorun :true}}}
Example output:
FAIL in (state-machine) (app/game/state/game_state_test.cljs:10:9)
Machine factory: make machine
expected: (= (sut/make-machine {:collection {:states (ordered-map :a {:on {:prev {:target :origin}}} :b :c {:on {:next {:target :end}}})}, :on {:skip {:target :end}}}) {[:collection :a] {:on {:prev {:target :origin}, :next {:target :b}, :skip {:target :end}}}, [:collection :b] {:on {:prev {:target :a}, :next {:target :c}, :skip {:target :end}}}, [:collection :c] {:on {:prev {:target :b}, :next {:target :end}, :skip {:target :end}}}})
  actual: (not (= {:collection {:states #ordered/map ([:a {:on {:prev {:target :origin}}}] [:b :c] [{:on {:next {:target :end}}} nil])}, :on {:skip {:target :end}}} {[:collection :a] {:on {:prev {:target :origin}, :next {:target :b}, :skip {:target :end}}}, [:collection :b] {:on {:prev {:target :a}, :next {:target :c}, :skip {:target :end}}}, [:collection :c] {:on {:prev {:target :b}, :next {:target :end}, :skip {:target :end}}}}))

thheller20:12:22

nothing shadow-cljs would do no. I guess you could try custom cljs.test formatters, if there are any