From a0da18d7fa9a5867279a9695e6d14aec0040625c Mon Sep 17 00:00:00 2001 From: Morluto <76467478+morluto@users.noreply.github.com> Date: Wed, 14 Oct 2026 02:14:51 +0800 Subject: [PATCH] test(capture): cover empty URL userinfo markers --- src/domain/recordedTransportUrl.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/domain/recordedTransportUrl.test.ts diff --git a/src/domain/recordedTransportUrl.test.ts b/src/domain/recordedTransportUrl.test.ts new file mode 100644 index 000000000..9c7b78ea0 --- /dev/null +++ b/src/domain/recordedTransportUrl.test.ts @@ -0,0 +1,11 @@ +import { expect, it } from "vitest"; + +import { parseRecordedTransportUrl } from "./recordedTransportUrl.js"; + +it("recognizes an empty userinfo marker at the authority start", () => { + expect(parseRecordedTransportUrl("https://@host")).toMatchObject({ + origin: "https://host", + path: "/", + credentials: { start: 8, end: 9 }, + }); +});