MCPcopy
hub / github.com/gofiber/fiber / Test_Hook_OnGroupName_Error

Function Test_Hook_OnGroupName_Error

hooks_test.go:171–182  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

169}
170
171func Test_Hook_OnGroupName_Error(t *testing.T) {
172 t.Parallel()
173 app := New()
174
175 app.Hooks().OnGroupName(func(_ Group) error {
176 return errors.New("unknown error")
177 })
178
179 require.PanicsWithError(t, "unknown error", func() {
180 _ = app.Group("/x").Name("x.")
181 })
182}
183
184func Test_Hook_OnPreShutdown(t *testing.T) {
185 t.Parallel()

Callers

nothing calls this directly

Calls 6

OnGroupNameMethod · 0.80
HooksMethod · 0.80
NewFunction · 0.70
NewMethod · 0.65
NameMethod · 0.65
GroupMethod · 0.65

Tested by

no test coverage detected