(t *testing.T)
| 162 | } |
| 163 | |
| 164 | func TestErrorHookShouldFireOnError(t *testing.T) { |
| 165 | hook := new(ErrorHook) |
| 166 | |
| 167 | LogAndAssertJSON(t, func(log *Logger) { |
| 168 | log.Hooks.Add(hook) |
| 169 | log.Error("test") |
| 170 | }, func(fields Fields) { |
| 171 | assert.True(t, hook.Fired) |
| 172 | }) |
| 173 | } |
| 174 | |
| 175 | func TestAddHookRace(t *testing.T) { |
| 176 | var wg sync.WaitGroup |
nothing calls this directly
no test coverage detected