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
// NewFoo creates a new instance of Foo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.// The first argument is typically a *testing.T value.funcNewFoo(tinterface {
mock.TestingTCleanup(func())
}) *Foo {
I use testify mock for several months now, and just found that.
Is there a reason for that? I think that method is very handy, because it lets your test fail, instead of getting a random panic in another goroutine if you have an error in On(...).
Activity
dolmen commentedon May 7, 2026
I don't understand this issue.
What code generator are your talking about?