Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions sloggers/slogtest/t.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ func (ts testSink) LogEntry(ctx context.Context, ent slog.SinkEntry) {
ts.tb.Error(s)
}
case slog.LevelFatal:
if ts.opts.IgnoreErrors {
panic("slogtest: cannot fatal in tests when IgnoreErrors option is set")
}
ts.tb.Fatal(s)
}
}
Expand Down
2 changes: 1 addition & 1 deletion sloggers/slogtest/t_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestIgnoreErrors(t *testing.T) {

defer func() {
recover()
assert.Equal(t, "fatals", 0, tb.fatals)
assert.Equal(t, "fatals", 1, tb.fatals)
}()

l.Fatal(bg, "hello")
Expand Down