import { describe, expect, it } from "vitest"; import type { CanonicalHousekeepingHref } from "../contracts"; import { HOUSEKEEPING_ROOT, toHousekeepingHref } from "./href"; describe("toHousekeepingHref", () => { it("keeps the canonical operations root unchanged", () => { expect(HOUSEKEEPING_ROOT).toBe("/ase"); expect(toHousekeepingHref("/ase")).toBe("/ase"); }); it("keeps canonical domain routes unchanged", () => { expect(toHousekeepingHref("/ase/people/users")).toBe("/ase/people/users"); }); it("rejects paths outside the canonical ase namespace", () => { expect(() => toHousekeepingHref("/admin" as CanonicalHousekeepingHref), ).toThrow("invalid canonical housekeeping href"); }); });