MCPcopy Create free account
hub / github.com/cli/cli / TestFrameReaderReadError

Function TestFrameReaderReadError

internal/eventstream/sse_test.go:221–228  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

219}
220
221func TestFrameReaderReadError(t *testing.T) {
222 readErr := io.ErrClosedPipe
223 r := NewFrameReader(io.MultiReader(strings.NewReader("data: a\n"), iotest.ErrReader(readErr)))
224
225 _, err := r.Next()
226
227 require.ErrorIs(t, err, readErr)
228}

Callers

nothing calls this directly

Calls 2

NextMethod · 0.95
NewFrameReaderFunction · 0.85

Tested by

no test coverage detected