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

Function graphQLBodyWithVariables

script/ghmock/server_test.go:67–72  ·  view source on GitHub ↗
(t *testing.T, query, variables string)

Source from the content-addressed store, hash-verified

65}
66
67func graphQLBodyWithVariables(t *testing.T, query, variables string) string {
68 t.Helper()
69 data, err := json.Marshal(map[string]any{"query": query, "variables": json.RawMessage(variables)})
70 require.NoError(t, err)
71 return string(data)
72}
73
74func TestMockServer(t *testing.T) {
75 limitBody := strings.Repeat("x", maxRequestBody)

Callers 1

TestMockServerFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected