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

Function TestErrorContains

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

Source from the content-addressed store, hash-verified

36}
37
38func TestErrorContains(t *testing.T) {
39 t.Parallel()
40
41 tb := &fakeTB{}
42 assert.ErrorContains(tb, "meow", io.EOF, "eof")
43
44 defer func() {
45 recover()
46 simpleassert.Equal(t, "fatals", 1, tb.fatals)
47 }()
48 assert.ErrorContains(tb, "meow", io.ErrClosedPipe, "eof")
49}
50
51func TestSuccess(t *testing.T) {
52 t.Parallel()

Callers

nothing calls this directly

Calls 1

ErrorContainsFunction · 0.92

Tested by

no test coverage detected