import { assert, it } from "@effect/vitest"; import { transportSafeSourceControlErrorValue } from "./SourceControlProvider.ts"; it("removes URL credentials, query parameters, and fragments from error transport values", () => { assert.strictEqual( transportSafeSourceControlErrorValue( "https://user:secret@example.test/org/repo/pull/42?token=secret#discussion", ), "https://example.test/org/repo/pull/42", ); }); it("normalizes control characters and bounds error transport values", () => { assert.strictEqual( transportSafeSourceControlErrorValue(` owner/repo\n\t${"x".repeat(300)} `), `owner/repo ${"x".repeat(245)}`, ); });