1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-21 06:53:05 +00:00

🔎 fix unhandled errors (#2048)

fix unhandled errors
This commit is contained in:
Amir Hossein 2022-08-26 14:32:46 +04:30 committed by GitHub
parent 235ff1649c
commit 01ea139da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -499,17 +499,20 @@ func Test_App_Order(t *testing.T) {
app := New()
app.Get("/test", func(c *Ctx) error {
c.Write([]byte("1"))
_, err := c.Write([]byte("1"))
utils.AssertEqual(t, nil, err)
return c.Next()
})
app.All("/test", func(c *Ctx) error {
c.Write([]byte("2"))
_, err := c.Write([]byte("2"))
utils.AssertEqual(t, nil, err)
return c.Next()
})
app.Use(func(c *Ctx) error {
c.Write([]byte("3"))
_, err := c.Write([]byte("3"))
utils.AssertEqual(t, nil, err)
return nil
})