gomega icon indicating copy to clipboard operation
gomega copied to clipboard

Expected vs actual test output unclear

Open chrishajas opened this issue 7 years ago • 2 comments

Current output from a matcher failure:

Expected
    <int>: 4
to equal
    <int>: 3

It is hard to tell which value was expected and which was the actual value by looking at this output.

Suggestions for output that would be easier to understand:

Expected:
    <int>: 4
Actual:
    <int>: 3

or (from RSpec)

Expected:
    <int>: 4
Got:
    <int>: 3

chrishajas avatar Feb 01 '18 01:02 chrishajas

FWIW i find the "expected vs actual" language to be the most clear

jumanjiman avatar Dec 12 '19 18:12 jumanjiman

The negated case is a bit harder. Currently we get:

Expected
    <int>: 4
not to equal
    <int>: 4

Rspec handles this as:

expected: value != 4
     got: 4

(compared using ==)

blgm avatar May 27 '20 16:05 blgm