(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func Test_Hook_OnRoute(t *testing.T) { |
| 26 | t.Parallel() |
| 27 | app := New() |
| 28 | |
| 29 | app.Hooks().OnRoute(func(r Route) error { |
| 30 | require.Empty(t, r.Name) |
| 31 | |
| 32 | return nil |
| 33 | }) |
| 34 | |
| 35 | app.Get("/", testSimpleHandler).Name("x") |
| 36 | |
| 37 | subApp := New() |
| 38 | subApp.Get("/test", testSimpleHandler) |
| 39 | |
| 40 | app.Use("/sub", subApp) |
| 41 | } |
| 42 | |
| 43 | func Test_Hook_OnRoute_Mount(t *testing.T) { |
| 44 | t.Parallel() |