TestWrapHTTPHandler_Flush_App_Test() — fiber Function Reference
Architecture documentation for the TestWrapHTTPHandler_Flush_App_Test() function in adapter_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD ef68b7be_cb7b_dd73_5b8f_8706b4b47858["TestWrapHTTPHandler_Flush_App_Test()"] 3ad7a4ef_7f07_008c_234d_52c9a342aa98["adapter_test.go"] ef68b7be_cb7b_dd73_5b8f_8706b4b47858 -->|defined in| 3ad7a4ef_7f07_008c_234d_52c9a342aa98 style ef68b7be_cb7b_dd73_5b8f_8706b4b47858 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
adapter_test.go lines 694–719
func TestWrapHTTPHandler_Flush_App_Test(t *testing.T) {
t.Parallel()
app := New()
app.Get("/", func(w http.ResponseWriter, _ *http.Request) {
flusher, ok := w.(http.Flusher)
if !ok {
t.Fatal("w does not implement http.Flusher")
}
w.WriteHeader(StatusOK)
fmt.Fprintf(w, "Hello ")
flusher.Flush()
fmt.Fprintf(w, "World!")
})
resp, err := app.Test(httptest.NewRequest(MethodGet, "/", http.NoBody))
require.NoError(t, err)
defer resp.Body.Close() //nolint:errcheck // not needed
require.Equal(t, StatusOK, resp.StatusCode)
body, err := io.ReadAll(resp.Body)
require.NoError(t, err)
require.Equal(t, "Hello World!", string(body))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestWrapHTTPHandler_Flush_App_Test() do?
TestWrapHTTPHandler_Flush_App_Test() is a function in the fiber codebase, defined in adapter_test.go.
Where is TestWrapHTTPHandler_Flush_App_Test() defined?
TestWrapHTTPHandler_Flush_App_Test() is defined in adapter_test.go at line 694.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free