MCPcopy Index your code
hub / github.com/labstack/echo / TestMiddlewares

Function TestMiddlewares

echo_test.go:1228–1239  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1226}
1227
1228func TestMiddlewares(t *testing.T) {
1229 e := New()
1230 assert.Equal(t, 0, len(e.Middlewares()))
1231
1232 e.Use(func(next HandlerFunc) HandlerFunc {
1233 return func(c *Context) error {
1234 return next(c)
1235 }
1236 })
1237
1238 assert.Equal(t, 1, len(e.Middlewares()))
1239}
1240
1241func TestEcho_Start(t *testing.T) {
1242 e := New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
MiddlewaresMethod · 0.80
UseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…