test(capture): cover empty URL userinfo markers

This commit is contained in:
Morluto
2026-10-14 02:14:51 +08:00
parent 2c6e074cac
commit a0da18d7fa
+11
View File
@@ -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 },
});
});