MCPcopy Create free account
hub / github.com/coder/coder / mustJSON

Function mustJSON

agent/x/agentmcp/config_test.go:249–254  ·  view source on GitHub ↗

mustJSON marshals v to a JSON string, failing the test on error.

(t *testing.T, v any)

Source from the content-addressed store, hash-verified

247
248// mustJSON marshals v to a JSON string, failing the test on error.
249func mustJSON(t *testing.T, v any) string {
250 t.Helper()
251 data, err := json.Marshal(v)
252 require.NoError(t, err)
253 return string(data)
254}

Callers 2

TestParseConfigFunction · 0.70

Calls 2

HelperMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected