Mayvenn / diff-eq

Prints diffs of your failing equality tests in clojure.test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Prints diffs of your failing equality tests in clojure.test

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%