MCPcopy Create free account
hub / github.com/coder/slog / TestError

Function TestError

sloggers/slogtest/assert/assert_test.go:90–101  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestError(t *testing.T) {
91 t.Parallel()
92
93 tb := &fakeTB{}
94 assert.Error(tb, "meow", io.EOF)
95
96 defer func() {
97 recover()
98 simpleassert.Equal(t, "fatals", 1, tb.fatals)
99 }()
100 assert.Error(tb, "meow", nil)
101}
102
103type fakeTB struct {
104 testing.TB

Callers

nothing calls this directly

Calls 1

ErrorFunction · 0.92

Tested by

no test coverage detected