Closed bushkov closed 4 months ago
Here is a reproducer: https://go.dev/play/p/E-lLwVrMXym
Is an issue still relevant? I see mentions in the https://github.com/stretchr/testify/pull/1483 PR that was merged.
cc @arjunmahishi
The custom error message is still not shown, this issue is valid.
I've addressed it in #1548 along with the http assertions
Bug summary
When
InEpsilonSlice
takes a custom error message and the assertion fails, the custom message isn't displayed.The issue is that in
InEpsilonSlice
implementation,msgAndArgs
isn't passed toInEpsilon
when iterating over slice elements:https://github.com/stretchr/testify/blob/0ab3ce1249292a7221058b9e370472bca8f04813/assert/assertions.go#L1366
It should be:
To reproduce
Write any test where
InEpsilonSlice
fails and takes a custom message. The message wouldn't be displayed.