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

Function Test_RoutePatternMatch_InvalidRegexHandlerPanics

path_test.go:766–772  ·  view source on GitHub ↗

Test_RoutePatternMatch_InvalidRegexHandlerPanics verifies RoutePatternMatch also validates RegexHandler configuration.

(t *testing.T)

Source from the content-addressed store, hash-verified

764
765// Test_RoutePatternMatch_InvalidRegexHandlerPanics verifies RoutePatternMatch also validates RegexHandler configuration.
766func Test_RoutePatternMatch_InvalidRegexHandlerPanics(t *testing.T) {
767 t.Parallel()
768
769 require.PanicsWithValue(t, "fiber: Config.RegexHandler must be a non-nil function", func() {
770 RoutePatternMatch("/api/123", "/api/:id<regex(\\d+)>", Config{RegexHandler: "invalid"})
771 })
772}

Callers

nothing calls this directly

Calls 1

RoutePatternMatchFunction · 0.85

Tested by

no test coverage detected