bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Use humane-test-output for better reporting #176

Closed nenadalm closed 3 weeks ago

nenadalm commented 6 years ago

Hi. humane-test-output has better reporting than karma-reporter.

It was decided that humane-test-output won't be integrated into karma-reporter a while ago (https://github.com/honzabrecka/karma-reporter/pull/9#issuecomment-264980263). Now I am using clojurescript a bit more than before, so I thought it would be nice if my tests had better reports.

(defrecord Person [fname lname])

(deftest rec-example
  (is (= (Person. "fir" "las")
         (Person. "fir" "last"))))

Before:

LOG: 'Testing app.db-test'
LOG: ''
LOG: 'ERROR: Exception outside tests:'
LOG: 'ERROR: #object[Error Error: Assert failed: (symbol? tag)]'
LOG: ''
LOG: 'ERROR: No stacktrace available.'
LOG: 'WARNING: doo's exit function was not properly set'
LOG: '#object[TypeError TypeError: doo.runner._STAR_exit_fn_STAR_ is null]'

After:

Firefox 59.0.0 (Fedora 0.0.0) app.db-test rec-example FAILED

    FAIL in (rec-example) (cljs/core.js:13393:8)

    , , expected: #app.db-test.Person{:fname "fir":lname "las"}
      actual: #app.db-test.Person{:fname "fir":lname "last"}
        diff: - {:lname "las"}
              + {:lname "last"}
nenadalm commented 3 weeks ago

just cleaning up my prs (deleting those where there is no interest).