MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestDefaultPortForFramework

Function TestDefaultPortForFramework

internal/cli/quickstart_detect_test.go:1201–1247  ·  view source on GitHub ↗

-- defaultPortForFramework --.

(t *testing.T)

Source from the content-addressed store, hash-verified

1199// -- defaultPortForFramework --.
1200
1201func TestDefaultPortForFramework(t *testing.T) {
1202 tests := []struct {
1203 framework string
1204 wantPort int
1205 }{
1206 // SPA vite frameworks.
1207 {"react", 5173},
1208 {"vue", 5173},
1209 {"svelte", 5173},
1210 {"vanilla-javascript", 5173},
1211 // SPA non-vite.
1212 {"angular", 4200},
1213 // Regular - Python.
1214 {"vanilla-python", 5000},
1215 {"flask", 5000},
1216 // Regular - PHP.
1217 {"laravel", 8000},
1218 // Regular - Java.
1219 {"spring-boot", 3000},
1220 {"java-ee", 8080},
1221 {"vanilla-java", 8080},
1222 // Regular - default 3000.
1223 {"nextjs", 3000},
1224 {"nuxt", 3000},
1225 {"express", 3000},
1226 {"fastify", 3000},
1227 {"hono", 3000},
1228 {"sveltekit", 5173},
1229 {"rails", 3000},
1230 {"vanilla-go", 3000},
1231 {"django", 8000},
1232 // Native - default 3000.
1233 {"aspnet-mvc", 5000},
1234 {"aspnet-owin", 5000},
1235 {"flutter", 3000},
1236 {"react-native", 3000},
1237 {"expo", 3000},
1238 // Catch-all.
1239 {"unknown-framework", 3000},
1240 }
1241
1242 for _, tc := range tests {
1243 t.Run(tc.framework, func(t *testing.T) {
1244 assert.Equal(t, tc.wantPort, defaultPortForFramework(tc.framework))
1245 })
1246 }
1247}
1248
1249// -- frameworksForType --.
1250

Callers

nothing calls this directly

Calls 1

defaultPortForFrameworkFunction · 0.85

Tested by

no test coverage detected