We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our unit tests are not that coherent in their names. We use a mix of different naming conventions, as they are written by different developers.
The simple answer is just to name them:
func Test{NameOfTypeOrFunction}(t *testing.T) // Example func Add(a, b int) int func TestAdd(t *testing.T)
But it gets diffuse when we start having multiple tests targetting the same function/type/method but with slight variations.
An example format of this (though not that great IMO):
func Test{NameOfTypeOrFunction}_{StateOfType}_{ExpectedResult}(t *testing.T) func TestAdd_GivenNegativeValues_ReturnsNegative(t *testing.T)
Suggest to write an RFC of this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Our unit tests are not that coherent in their names. We use a mix of different naming conventions, as they are written by different developers.
The simple answer is just to name them:
But it gets diffuse when we start having multiple tests targetting the same function/type/method but with slight variations.
An example format of this (though not that great IMO):
Suggest to write an RFC of this.
The text was updated successfully, but these errors were encountered: