fakeT is a fake implementation of testing.TB that never fails and only logs errors. Fatal errors will cause the goroutine to exit without failing the test. The behavior of the fake implementation should be as close as possible to the real implementation from the test function's perspective (minus i
| 92 | // the real implementation from the test function's perspective (minus |
| 93 | // intentionally unimplemented methods). |
| 94 | type fakeT struct { |
| 95 | *testing.T |
| 96 | ctx context.Context |
| 97 | name string |
| 98 | |
| 99 | mu sync.Mutex |
| 100 | failed bool |
| 101 | cleanupFns []func() |
| 102 | } |
| 103 | |
| 104 | var _ testing.TB = &fakeT{} |
| 105 |
nothing calls this directly
no outgoing calls
no test coverage detected