TestTimeout_UnmatchedError() — fiber Function Reference
Architecture documentation for the TestTimeout_UnmatchedError() function in timeout_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD b91e8325_45ec_6455_97f0_cf9575e59b8a["TestTimeout_UnmatchedError()"] bab1b67e_4e42_cfe9_38ec_3f1f6a839718["timeout_test.go"] b91e8325_45ec_6455_97f0_cf9575e59b8a -->|defined in| bab1b67e_4e42_cfe9_38ec_3f1f6a839718 style b91e8325_45ec_6455_97f0_cf9575e59b8a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/timeout/timeout_test.go lines 165–178
func TestTimeout_UnmatchedError(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Get("/unmatched", New(func(_ fiber.Ctx) error {
return errUnrelated // Not in the custom error list
}, Config{Timeout: 100 * time.Millisecond, Errors: []error{errCustomTimeout}}))
req := httptest.NewRequest(fiber.MethodGet, "/unmatched", http.NoBody)
resp, err := app.Test(req)
require.NoError(t, err, "app.Test(req) should not fail")
require.Equal(t, fiber.StatusInternalServerError, resp.StatusCode,
"Expected 500 because the error is not recognized as a timeout error")
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestTimeout_UnmatchedError() do?
TestTimeout_UnmatchedError() is a function in the fiber codebase, defined in middleware/timeout/timeout_test.go.
Where is TestTimeout_UnmatchedError() defined?
TestTimeout_UnmatchedError() is defined in middleware/timeout/timeout_test.go at line 165.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free