DEV Community
•
2026-04-21 14:33
Testify is making your Go tests worse
Pop quiz.
Does this testify assertion pass or fail?
var x []int
y := []int{}
require.Equal(t, x, y)
If you're like me, you have no idea. Arguments for both passing and failing seem reasonable. Let's jump to the docs:
func Equal
func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
Equal asserts that two objects are equal.
Well that's no...