testify
testify copied to clipboard
EventuallyWithTf function help is incorrect, misleading callback signature
Documentation shows that the callback function format is func(c *assert.CollectT, "error message %s", "formatted") which is incorrect.
Formatting arguments are only valid for EventuallyWithTf itself, while the callback is just func(c *assert.CollectT).
The issue appears for:
-
assert.EventuallyWithTf(): https://github.com/stretchr/testify/blob/429ee0b8f4efde767b69e2b6421ec6dfbd75fd22/assert/assertion_format.go#L193 -
require.EventuallyWithTf(): https://github.com/stretchr/testify/blob/429ee0b8f4efde767b69e2b6421ec6dfbd75fd22/require/require.go#L460 - As a method on
*Assertionreceiver inassertpackage: https://github.com/stretchr/testify/blob/429ee0b8f4efde767b69e2b6421ec6dfbd75fd22/assert/assertion_forward.go#L375 - As a method on
*Assertionreceiver inrequirepackage: https://github.com/stretchr/testify/blob/429ee0b8f4efde767b69e2b6421ec6dfbd75fd22/require/require_forward.go#L376