From 89e52d61787a58dea07534bc452bfdae93f26014 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 14 Mar 2026 01:02:20 +0000 Subject: [PATCH] test: tighten hostname normalization coverage --- src/infra/net/hostname.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/infra/net/hostname.test.ts b/src/infra/net/hostname.test.ts index 90e4c939e91..ca7c597f8bb 100644 --- a/src/infra/net/hostname.test.ts +++ b/src/infra/net/hostname.test.ts @@ -4,10 +4,12 @@ import { normalizeHostname } from "./hostname.js"; describe("normalizeHostname", () => { it("trims, lowercases, and strips a trailing dot", () => { expect(normalizeHostname(" Example.COM. ")).toBe("example.com"); + expect(normalizeHostname(" ")).toBe(""); }); it("unwraps bracketed ipv6 hosts after normalization", () => { expect(normalizeHostname(" [FD7A:115C:A1E0::1] ")).toBe("fd7a:115c:a1e0::1"); + expect(normalizeHostname(" [FD7A:115C:A1E0::1]. ")).toBe("fd7a:115c:a1e0::1"); }); it("leaves non-fully-bracketed values otherwise unchanged", () => {