Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report doesn't print a diff when used with Ultra #67

Open
LukasRychtecky opened this issue Mar 11, 2019 · 2 comments
Open

Report doesn't print a diff when used with Ultra #67

LukasRychtecky opened this issue Mar 11, 2019 · 2 comments

Comments

@LukasRychtecky
Copy link

LukasRychtecky commented Mar 11, 2019

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}
@weavejester
Copy link
Owner

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.

@weavejester weavejester changed the title Report doesn't print a diff when a value is a structure Report doesn't print a diff when used with Ultra Mar 13, 2019
@weavejester
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants