eftest
eftest copied to clipboard
Report doesn't print a diff when used with Ultra
Actual:
FAIL in foo-test/bar-test (foo_test.clj:10)
expected: {:a 0, :b 1}
actual: ({:b 1, :c 2})
Expected:
FAIL in foo-test/bar-test (foo_test.clj:10)
expected: {:a 0, :b 1}
actual: {:b 1, :c 2}
diff: - {:a 0}
+ {:c 2}
I've tried reproducing this with the following test namespace:
(ns foo.core-test
(:require [clojure.test :refer :all]
[foo.core :refer :all]))
(deftest a-test
(is (= {:a 0, :b 1} {:b 1, :c 2})))
And running lein eftest with Eftest 0.5.7 produces:
FAIL in foo.core-test/a-test (core_test.clj:6)
expected: {:a 0, :b 1}
actual: {:b 1, :c 2}
diff: - {:a 0}
+ {:c 2}
1/1 100% [==================================================] ETA: 00:00
Ran 1 tests in 0.038 seconds
1 assertion, 1 failure, 0 errors.
Tests failed.
My guess is that you have a Leiningen plugin that's altering the test reporting. Maybe it's erroneously wrapping the actual value in a list.
This looks like an issue caused by Ultra, which changes the reporting format for equality assertions. Ideally Ultra shouldn't change the reporting format used by clojure.test, otherwise third-party test reporters won't work if the Ultra plugin is included.