mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 19:28:46 +01:00
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:
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", () => ({
|
||||
|
||||
Reference in new issue
Block a user