Home / Function/ Test_executeOnRouteHooks_ErrorWithMount() — fiber Function Reference

Test_executeOnRouteHooks_ErrorWithMount() — fiber Function Reference

Architecture documentation for the Test_executeOnRouteHooks_ErrorWithMount() function in hooks_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  403a8ef5_d0f6_28af_7b0a_40c78cb3b1d1["Test_executeOnRouteHooks_ErrorWithMount()"]
  2d218330_4ff5_8bbe_d9c4_174410c41dd0["hooks_test.go"]
  403a8ef5_d0f6_28af_7b0a_40c78cb3b1d1 -->|defined in| 2d218330_4ff5_8bbe_d9c4_174410c41dd0
  style 403a8ef5_d0f6_28af_7b0a_40c78cb3b1d1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

hooks_test.go lines 581–595

func Test_executeOnRouteHooks_ErrorWithMount(t *testing.T) {
	t.Parallel()
	app := New()
	app.mountFields.mountPath = testMountPath

	var received string
	app.Hooks().OnRoute(func(r Route) error {
		received = r.Path
		return errors.New("hook error")
	})

	err := app.hooks.executeOnRouteHooks(&Route{Path: "/foo", path: "/foo"})
	require.Equal(t, testMountPath+"/foo", received)
	require.EqualError(t, err, "hook error")
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_executeOnRouteHooks_ErrorWithMount() do?
Test_executeOnRouteHooks_ErrorWithMount() is a function in the fiber codebase, defined in hooks_test.go.
Where is Test_executeOnRouteHooks_ErrorWithMount() defined?
Test_executeOnRouteHooks_ErrorWithMount() is defined in hooks_test.go at line 581.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free