MCPcopy
hub / github.com/larksuite/cli / TestParseJSONResponse_EmptyBody_WrapsEOF

Function TestParseJSONResponse_EmptyBody_WrapsEOF

internal/client/response_test.go:83–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestParseJSONResponse_EmptyBody_WrapsEOF(t *testing.T) {
84 resp := newApiResp([]byte{}, map[string]string{"Content-Type": "application/json"})
85 _, err := ParseJSONResponse(resp)
86 if err == nil {
87 t.Fatal("expected error for empty body")
88 }
89 if !errors.Is(err, io.EOF) {
90 t.Fatalf("expected wrapped io.EOF, got %v", err)
91 }
92}
93
94func TestResolveFilename(t *testing.T) {
95 tests := []struct {

Callers

nothing calls this directly

Calls 3

newApiRespFunction · 0.85
ParseJSONResponseFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected