haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Output sometimes hard to read #304

Closed dlidstrom closed 5 years ago

dlidstrom commented 5 years ago

It seems that Expecto varies the output depending on the type of failure. For some types of failures, this makes the output hard to read. For other types of failures the output is easy to read. For an example of what is easy to read:

expecto-good

The output above is clearly stating what is expected and what is actual.

Now to an example of what I consider hard to read:

expecto-bad

Here it is much harder to see what is expected and what is actual, even if the output in this case is quite small. The order of expected/actual even differs from the first example which is confusing IMO. At the least, a line break before "but had expected it to be" would be more clear. Can this be improved to be shown as the first example for all kinds of failures?

AnthonyLloyd commented 5 years ago

I can make it a bit more consistent. Nested diff position is a bit more tricky but could be possible.

AnthonyLloyd commented 5 years ago

@dlidstrom I've make this more consistent and highlighted differences in Expected and Actual. Let me know if you see anything else.