Home / Function/ TestToFiberHandler_ExpressThreeParamsWithoutError() — fiber Function Reference

TestToFiberHandler_ExpressThreeParamsWithoutError() — fiber Function Reference

Architecture documentation for the TestToFiberHandler_ExpressThreeParamsWithoutError() function in adapter_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  b30ba666_b114_bf2a_3f74_febd5b3f2180["TestToFiberHandler_ExpressThreeParamsWithoutError()"]
  3ad7a4ef_7f07_008c_234d_52c9a342aa98["adapter_test.go"]
  b30ba666_b114_bf2a_3f74_febd5b3f2180 -->|defined in| 3ad7a4ef_7f07_008c_234d_52c9a342aa98
  3776f9ef_b978_a0be_2199_412bb0eee3ec["newTestCtx()"]
  b30ba666_b114_bf2a_3f74_febd5b3f2180 -->|calls| 3776f9ef_b978_a0be_2199_412bb0eee3ec
  0ba29dbe_6ac4_3e52_572c_88fd521daa4b["withRouteHandlers()"]
  b30ba666_b114_bf2a_3f74_febd5b3f2180 -->|calls| 0ba29dbe_6ac4_3e52_572c_88fd521daa4b
  style b30ba666_b114_bf2a_3f74_febd5b3f2180 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

adapter_test.go lines 156–179

func TestToFiberHandler_ExpressThreeParamsWithoutError(t *testing.T) {
	t.Parallel()

	app, ctx := newTestCtx(t)

	handler := func(req Req, _ Res, next func() error) {
		assert.Equal(t, app, req.App())
		err := next()
		require.Error(t, err)
		assert.EqualError(t, err, "next without error")
	}

	converted, ok := toFiberHandler(handler)
	require.True(t, ok)

	nextHandler := func(_ Ctx) error {
		return errors.New("next without error")
	}

	withRouteHandlers(t, ctx, converted, nextHandler)

	err := converted(ctx)
	require.EqualError(t, err, "next without error")
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestToFiberHandler_ExpressThreeParamsWithoutError() do?
TestToFiberHandler_ExpressThreeParamsWithoutError() is a function in the fiber codebase, defined in adapter_test.go.
Where is TestToFiberHandler_ExpressThreeParamsWithoutError() defined?
TestToFiberHandler_ExpressThreeParamsWithoutError() is defined in adapter_test.go at line 156.
What does TestToFiberHandler_ExpressThreeParamsWithoutError() call?
TestToFiberHandler_ExpressThreeParamsWithoutError() 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