Add Link mock to IssueDocumentsSection tests (PAP-10579)

The PAP-10569 Open-in-Documents change added a <Link> from @/lib/router
inside IssueDocumentsSection, but the test file's vi.mock("@/lib/router")
block only exported useLocation, so all 8 tests crashed during render
with "No Link export is defined". Add a passthrough <a> mock for Link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 4.8 committed 2026-06-07 03:00:07 +00:00
1 parent b8a329b34b
commit ae8ac332b4
1 file changed
+5
@@ -40,6 +40,11 @@ vi.mock("../hooks/useAutosaveIndicator", () => ({
vi.mock("@/lib/router", () => ({
useLocation: () => ({ hash: "" }),
Link: ({ to, children, ...props }: { to: unknown; children?: unknown } & ComponentProps<"a">) => (
<a href={typeof to === "string" ? to : undefined} {...props}>
{children as ComponentProps<"a">["children"]}
</a>
),
}));
vi.mock("./MarkdownBody", () => ({