/diff-eq

Prints diffs of your failing equality tests in clojure.test

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

diff-eq

Pronouced: Diff-eee-cue

Appends a diff message to tests that fail equality.

Screenshot in cider

Rationale

We were previously using humane-test-output, but it suffers from two problems:

  • It doesn't integrate with cider test. So you can't see the diffs when using cider
  • It hangs cider with diffing values that contains floats or doubles.

Usage

Add this to your lein profile:

{:user {:dependencies [[diff-eq "0.2.3"]]
        :injections [(require 'diff-eq.core)
                     (diff-eq.core/diff!)]}}

Or your project.clj:

(defproject ...

  :profiles {:dev {:dependencies [[diff-eq "0.2.3"]]
                   :injections [(require 'diff-eq.core)
                                (diff-eq.core/diff!)]}})

And then lein deps.

License

Copyright © 2015 Mayvenn

Distributed under the Eclipse Public License version 1.0.