-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Milestone
Description
Running testifylint on a large codebase at work I noticed that people sometimes use Contains to check error messages, something that testifylint currently doesn't detect
Expected results:
❌ assert.Contains(t, err.Error(), "error")
require.Contains(t, err.Error(), "error")
s.Contains(err.Error(), "error")
✅ assert.ErrorContains(t, err, "error")
require.ErrorContains(t, err, "error")
s.ErrorContains(err, "error")masaru-iritani