(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestNegotiateError(t *testing.T) { |
| 108 | _, api := humatest.New(t, huma.Config{OpenAPI: &huma.OpenAPI{Info: &huma.Info{Title: "Test API", Version: "1.0.0"}}}) |
| 109 | |
| 110 | req, _ := http.NewRequest("GET", "/", nil) |
| 111 | resp := httptest.NewRecorder() |
| 112 | ctx := humatest.NewContext(&huma.Operation{}, req, resp) |
| 113 | require.Error(t, huma.WriteErr(api, ctx, 400, "bad request")) |
| 114 | } |
| 115 | |
| 116 | func TestTransformError(t *testing.T) { |
| 117 | config := huma.DefaultConfig("Test API", "1.0.0") |
nothing calls this directly
no test coverage detected
searching dependent graphs…