You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! We're using test suites in our project and we've noticed we sometimes forget to add a test with the call to suite.Run(t *testing.T, suite suite.TestingSuite) so the suite is not executed with go test. Is it possible to somehow catch this using this linter tool or would it be a valid feature to add?
type MyTestSuite struct {
suite.Suite
}
// This is what I want to ensure with linter - so it fails if the call to suite.Run is not there
func TestMyTestSuite(t *testing.T) {
suite.Run(t, new(MyTestSuite))
}
func (s *MyTestSuite) TestSomething() {
// Actual test code...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! We're using test suites in our project and we've noticed we sometimes forget to add a test with the call to
suite.Run(t *testing.T, suite suite.TestingSuite)
so the suite is not executed withgo test
. Is it possible to somehow catch this using this linter tool or would it be a valid feature to add?Beta Was this translation helpful? Give feedback.
All reactions