require/tests: add Helper() method to all mocks of *testing.T

pull/1423/head
Olivier Mengué 2023-07-11 21:54:58 +02:00
parent fd06ff3e02
commit da8268db44
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ type MockT struct {
Failed bool
}
// Helper is like [testing.T.Helper] but does nothing.
func (MockT) Helper() {}
func (t *MockT) FailNow() {
t.Failed = true
}