mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-11 01:39:41 +02:00
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:
@@ -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`.
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user