Skip to content

Commit

Permalink
Don't pprint expected/actual test results, just use prn instead which…
Browse files Browse the repository at this point in the history
… respects things like matcher combinator printers #569
  • Loading branch information
Olical committed May 31, 2024
1 parent bded837 commit cd548bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
:deps
{org.clojure/clojure {:mvn/version "1.11.3"}
org.clojure/tools.logging {:mvn/version "1.1.0"}
lambdaisland/kaocha {:mvn/version "1.66.1034"}}
lambdaisland/kaocha {:mvn/version "1.66.1034"}
nubank/matcher-combinators {:mvn/version "3.9.1"}}

:aliases
{:nrepl
Expand Down
7 changes: 7 additions & 0 deletions dev/clojure/src/dev/sandbox.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
(t/testing "bar"
(t/is (= 10 10))))

(comment
(require '[matcher-combinators.test])

(t/deftest test-matching-with-explicit-matchers
(t/is (match? [{:a 1} {:b 2}]
[{:a 1 :c 2}]))))

(let [some-local-thing 10
some-other-local-thing 20]
some-local-thing)
Expand Down
4 changes: 2 additions & 2 deletions fnl/conjure/client/clojure/nrepl/server.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@
" (println \"\nFAIL in\" (clojure.test/testing-vars-str m))"
" (when (seq clojure.test/*testing-contexts*) (println (clojure.test/testing-contexts-str)))"
" (when-let [message (:message m)] (println message))"
" (print \"expected:\" (with-out-str (pp/pprint (:expected m))))"
" (print \" actual:\" (with-out-str (pp/pprint (:actual m))))"
" (print \"expected:\" (with-out-str (prn (:expected m))))"
" (print \" actual:\" (with-out-str (prn (:actual m))))"
" (when (and (seq? (:actual m))"
" (= #'clojure.core/not (resolve (first (:actual m))))"
" (seq? (second (:actual m)))"
Expand Down
2 changes: 1 addition & 1 deletion lua/conjure/client/clojure/nrepl/server.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd548bc

Please sign in to comment.