TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() — fiber Function Reference
Architecture documentation for the TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() function in adapter_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD e00611c8_aebf_62cd_61a9_d63ea4f4fbda["TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError()"] 3ad7a4ef_7f07_008c_234d_52c9a342aa98["adapter_test.go"] e00611c8_aebf_62cd_61a9_d63ea4f4fbda -->|defined in| 3ad7a4ef_7f07_008c_234d_52c9a342aa98 3776f9ef_b978_a0be_2199_412bb0eee3ec["newTestCtx()"] e00611c8_aebf_62cd_61a9_d63ea4f4fbda -->|calls| 3776f9ef_b978_a0be_2199_412bb0eee3ec 0ba29dbe_6ac4_3e52_572c_88fd521daa4b["withRouteHandlers()"] e00611c8_aebf_62cd_61a9_d63ea4f4fbda -->|calls| 0ba29dbe_6ac4_3e52_572c_88fd521daa4b style e00611c8_aebf_62cd_61a9_d63ea4f4fbda fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
adapter_test.go lines 292–318
func TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError(t *testing.T) {
t.Parallel()
app, ctx := newTestCtx(t)
handler := func(req Req, res Res, next func(error) error) {
assert.Equal(t, app, req.App())
assert.Equal(t, app, res.App())
require.EqualError(t, next(nil), "next error")
}
converted, ok := toFiberHandler(handler)
require.True(t, ok)
nextErr := errors.New("next error")
nextCalled := false
nextHandler := func(_ Ctx) error {
nextCalled = true
return nextErr
}
withRouteHandlers(t, ctx, converted, nextHandler)
err := converted(ctx)
require.ErrorIs(t, err, nextErr)
require.True(t, nextCalled)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() do?
TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() is a function in the fiber codebase, defined in adapter_test.go.
Where is TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() defined?
TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() is defined in adapter_test.go at line 292.
What does TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() call?
TestToFiberHandler_ExpressNextWithErrorReturnCallback_PropagatesNextError() calls 2 function(s): newTestCtx, withRouteHandlers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free