Assert.Equal show only diff
Description
Wondering if there's a way to show only the diff and not this part:
Error: Not equal:
expected: ...
actual ...
I have large yaml strings I'm comparing, and this part of the test output is completely useless. The diff looks fine though.
Proposed solution
Use case
That's currently not possible with any of the assertion functions. That formatted string always gets returned.
https://github.com/stretchr/testify/blob/v1.9.0/assert/assertions.go#L466-L469
I agree that tends to not be helpful for large strings and interfaces.
As a side note for your use case: The assertions package also hasYAMLEq
I also dislike scrolling past a large object twice to get to the diff. But I sometimes copy and paste the objects into a better diff viewer. I'd support a change that moved the diff to the top.