MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / parseJSON

Function parseJSON

internal/server/server_test.go:65–70  ·  view source on GitHub ↗
(t *testing.T, rr *httptest.ResponseRecorder, v interface{})

Source from the content-addressed store, hash-verified

63}
64
65func parseJSON(t *testing.T, rr *httptest.ResponseRecorder, v interface{}) {
66 t.Helper()
67 if err := json.Unmarshal(rr.Body.Bytes(), v); err != nil {
68 t.Fatalf("failed to parse JSON response: %v\nBody: %s", err, rr.Body.String())
69 }
70}
71
72func TestHealthEndpoint(t *testing.T) {
73 t.Parallel()

Calls 3

HelperMethod · 0.80
FatalfMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected