MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / compareJSONBodies

Function compareJSONBodies

backend/pkg/httpserver/server_test.go:1248–1262  ·  view source on GitHub ↗
(t *testing.T, actualBody, expectedBody []byte)

Source from the content-addressed store, hash-verified

1246 }
1247}
1248
1249// nolint: gochecknoglobals
1250var (
1251 inputPageToken = new("input-token")
1252 nextPageToken = new("next-page-token")
1253 badPageToken = new("")
1254 errTest = errors.New("test error")
1255)
1256
1257func testJSONResponse(statusCode int, body string) *http.Response {
1258 // nolint:exhaustruct // WONTFIX - only for test purposes
1259 return &http.Response{
1260 StatusCode: statusCode,
1261 Header: http.Header{
1262 "Content-Type": []string{"application/json"},
1263 },
1264 Body: io.NopCloser(strings.NewReader(body)),
1265 }

Callers 1

assertResponseBodyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected