Closed Trylobot closed 7 years ago
What version of Ultra are you using? It should be working with lein test.
0.4.1
clone https://github.com/Trylobot/hive-clj lein test
Hmm. So, Ultra is active, but it's not active for stacktraces. I'll look into this.
I think this is because stacktraces within the tests are using a stacktrace printing method that I haven't targeted. Trying to run the tests at the REPL produces the same result. I'll look into this further.
Thanks! Love your plugin, by the way. Every Clojurist at my company is using it :+1:
That's awesome! What company?
Yodle (just acquired by web.com)
Hello! I had a look at this and I think adding the following to the ultra.test
namespace would solve the issue:
(defmethod report :error [m]
(with-test-out
(inc-report-counter :error)
(println "\nERROR in" (testing-vars-str m))
(when (seq *testing-contexts*) (println (testing-contexts-str)))
(when-let [message (:message m)] (println message))
(println "expected:" (pr-str (:expected m)))
(print " actual: ")
(let [actual (:actual m)]
(if (instance? Throwable actual)
(pretty-repl/pretty-print-stack-trace actual)
(prn actual)))))
This is adapted from the original report code here: https://github.com/clojure/clojure/blob/clojure-1.8.0/src/clj/clojure/test.clj#L383-L394
With the only difference being (pretty-repl/pretty-print-stack-trace actual)
instead of (stack/print-cause-trace actual *stack-trace-depth*)
@Jell wanna make a PR? 😄
@venantius I made one here: https://github.com/venantius/ultra/pull/73
Any update on this?
Just left some comments on the PR.
I've updated the PR
This has been resolved by #73 -- I'll push out a release later today.
> lein test
- output not enhanced> lein repl \ (run-tests)
- output enhancedHow can I get your stuff working with lein test? It's more convenient for me than (run-tests)