Home / Function/ Test_CORS_Next() — fiber Function Reference

Test_CORS_Next() — fiber Function Reference

Architecture documentation for the Test_CORS_Next() function in cors_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  0cd070f1_13a3_b86d_0bae_0ddf4c0e1fa7["Test_CORS_Next()"]
  e59a43fd_cfa4_0f6b_1938_4a08e36ad74e["cors_test.go"]
  0cd070f1_13a3_b86d_0bae_0ddf4c0e1fa7 -->|defined in| e59a43fd_cfa4_0f6b_1938_4a08e36ad74e
  style 0cd070f1_13a3_b86d_0bae_0ddf4c0e1fa7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/cors/cors_test.go lines 568–580

func Test_CORS_Next(t *testing.T) {
	t.Parallel()
	app := fiber.New()
	app.Use(New(Config{
		Next: func(_ fiber.Ctx) bool {
			return true
		},
	}))

	resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody))
	require.NoError(t, err)
	require.Equal(t, fiber.StatusNotFound, resp.StatusCode)
}

Domain

Subdomains

Frequently Asked Questions

What does Test_CORS_Next() do?
Test_CORS_Next() is a function in the fiber codebase, defined in middleware/cors/cors_test.go.
Where is Test_CORS_Next() defined?
Test_CORS_Next() is defined in middleware/cors/cors_test.go at line 568.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free