Test_Compress_Disabled() — fiber Function Reference
Architecture documentation for the Test_Compress_Disabled() function in compress_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 5c6e9a6e_8ebb_19ad_8b13_77bb6e3e5997["Test_Compress_Disabled()"] d6d930a5_a4c6_37a5_5df5_4b38486d6fe6["compress_test.go"] 5c6e9a6e_8ebb_19ad_8b13_77bb6e3e5997 -->|defined in| d6d930a5_a4c6_37a5_5df5_4b38486d6fe6 style 5c6e9a6e_8ebb_19ad_8b13_77bb6e3e5997 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/compress/compress_test.go lines 168–190
func Test_Compress_Disabled(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Use(New(Config{Level: LevelDisabled}))
app.Get("/", func(c fiber.Ctx) error {
return c.Send(filedata)
})
req := httptest.NewRequest(fiber.MethodGet, "/", http.NoBody)
req.Header.Set("Accept-Encoding", "br")
resp, err := app.Test(req, testConfig)
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 200, resp.StatusCode, "Status code")
require.Empty(t, resp.Header.Get(fiber.HeaderContentEncoding))
// Validate the file size is not shrunk
body, err := io.ReadAll(resp.Body)
require.NoError(t, err)
require.Len(t, body, len(filedata))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Compress_Disabled() do?
Test_Compress_Disabled() is a function in the fiber codebase, defined in middleware/compress/compress_test.go.
Where is Test_Compress_Disabled() defined?
Test_Compress_Disabled() is defined in middleware/compress/compress_test.go at line 168.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free