test(web): add race-free loopback smoke

This commit is contained in:
Tianyi Cui
2026-07-22 21:35:32 +08:00
parent 6b3bdec581
commit 6d756fd4c9
5 changed files with 44 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ export async function runWeb(argv: string[]): Promise<void> {
}
const hostAddress = values.host
const port = Number(values.port)
if (!Number.isInteger(port) || port <= 0 || port > 65535) {
if (!Number.isInteger(port) || port < 0 || port > 65535) {
process.stderr.write(`dsh web: invalid --port ${values.port}\n`)
process.exit(1)
}