mustMarshalJSON marshals v to a JSON string, failing the test on error.
(t *testing.T, v any)
| 154 | |
| 155 | // mustMarshalJSON marshals v to a JSON string, failing the test on error. |
| 156 | func mustMarshalJSON(t *testing.T, v any) string { |
| 157 | t.Helper() |
| 158 | b, err := json.Marshal(v) |
| 159 | require.NoError(t, err) |
| 160 | return string(b) |
| 161 | } |
no test coverage detected