docs(tests): finish the ephemeral-port wording (#570)

- docs/browser-testing-guide.md still described the shrink-only legacy list
  and the mobile suite's fixed ports; both are gone.
- CLAUDE.md: name the one fixed port left (codex-predictive-echo's separate
  lab server on 3222), keep "Never 3000", and say the guard refuses a fixed
  port rather than that it checks boundPort is read.
- The tui-client comment described the old "port + 1" dead port.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-10 02:54:39 +02:00
parent 93642fa616
commit 217c90b6a1
4 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -9,8 +9,8 @@
*
* Two rules, both over every file under test/:
* - A `WebServer` is built with the literal `0` as its port — `new WebServer(…)`, a
* class declared `extends WebServer`, or a destructured alias (`{ WebServer: T }`) —
* and the test reads `server.boundPort`.
* class declared `extends WebServer`, or a destructured alias (`{ WebServer: T }`).
* The test then reads `server.boundPort`, which this guard does not check.
* - A raw server (`http`/`net`/Fastify `listen`, `new WebSocketServer`) never listens
* on a number or a `…PORT` constant: `listen(0, …)` / `{ port: 0 }`, then
* `address().port`.
+1 -1
View File
@@ -46,7 +46,7 @@ async function closedPort(): Promise<number> {
}
let port: number;
/** Nothing listens one above the bound port: the "no server" path. */
/** A port nothing listens on (`closedPort()`): the "no server" path. */
let deadPort: number;
let baseUrl: string;