Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of testing.T not passed to the test function. #197

Open
brackendawson opened this issue Nov 11, 2024 · 0 comments
Open

Use of testing.T not passed to the test function. #197

brackendawson opened this issue Nov 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@brackendawson
Copy link

brackendawson commented Nov 11, 2024

From stretchr/testify#1676

✅ Good

func TestIfy(t *testing.T) {
	assert.Equal(t, 0, 0)
}

❌ Bad

func TestIfy(t *testing.T) {
	u := &testing.T{}
	assert.Equal(u, 0, 0)
}
func TestIfy(t *testing.T) {
	assert.Equal(nil, 0, 0)
}
@Antonboom Antonboom added the enhancement New feature or request label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants