bensu/doo

How to prettify test reports in Karma?

Closed this issue · 2 comments

In phantom I was using pjstadig/humane-test-output to get nice error messages on failures. But in Karma it doesn't seem to work, test failures about comparing big data structures are now unreadable. What is the best way to see nice reports in Karma again?

E.g.:

(is (= {1 2 3 4} {1 2 3 3 4 5 6 7}))

Output in phantom with pjstadig/humane-test-output:

expected: {1 2, 3 4}
  actual: {1 2, 3 3, 4 5, 6 7}

    diff: - {3 4}
          + {3 3, 4 5, 6 7}

In chrome-headless with pjstadig/humane-test-output:

{1 2, 3 4} failed with ({1 2, 3 3, 4 5, 6 7})

Hm, seems like I had some conflicts with other deps/plugins. In the end, after clearing up my deps, this combination seems to produce the expected message:

[lein-doo "0.1.9"]

[pjstadig/humane-test-output "0.8.2"]

Closing for now.

bensu commented

Thank you for the report!