(t *testing.T)
| 88 | } |
| 89 | |
| 90 | func Test_Hook_OnName_Error(t *testing.T) { |
| 91 | t.Parallel() |
| 92 | app := New() |
| 93 | |
| 94 | app.Hooks().OnName(func(_ Route) error { |
| 95 | return errors.New("unknown error") |
| 96 | }) |
| 97 | |
| 98 | require.PanicsWithError(t, "unknown error", func() { |
| 99 | app.Get("/", testSimpleHandler).Name("index") |
| 100 | }) |
| 101 | } |
| 102 | |
| 103 | func Test_Hook_OnGroup(t *testing.T) { |
| 104 | t.Parallel() |