Closed symfrog closed 9 years ago
The intention (and current behaviour, at least in the environments I use regularly) is that the full output you quote should appear in the REPL, not in the browser console.
The Rhino test runner script does appear to set up the environment so that the output is complete in that context, e.g. https://travis-ci.org/cemerick/clojurescript.test/jobs/26449513#L266
It sounds like this might be a problem with the browser-REPL you're using, at least w.r.t. Rhino...
I am using the following to start the server:
(cemerick.piggieback/cljs-repl :repl-env (cljs.repl.browser/repl-env :port 9000))
and
(clojure.browser.repl /connect "http://localhost:9000/repl")
to connect.
Sorry for the troubles, but I've deprecated this project. Please see the notice at the top of the repo's README. This is a good thing, fundamentally. :-)
I was struggling to get the detailed report to print on failure in both a full browser environment as well as a Rhino environment.
For example, invoking (run-all) in the following definition:
would only print the summary in the REPL:
{:test 1, :pass 0, :fail 1, :error 0}
In order to see the full report failure printed (enable-console-print!) must be called before running the tests. This will result in the following in the browser console (whereas nothing appears without the call):
So the definition would be:
In order to make it work in a Rhino environment use:
(set! *print-fn* (fn [& args] (.println java.lang.System.out (apply str args))))
instead of (enable-console-print!)
Hopefully this will help someone else that might encounter this issue.