mustJSON marshals v to a JSON string, failing the test on error.
(t *testing.T, v any)
| 247 | |
| 248 | // mustJSON marshals v to a JSON string, failing the test on error. |
| 249 | func 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 | } |
no test coverage detected