Fix Link mock typing in FlightsMiniList test

This commit is contained in:
2026-04-16 23:36:41 +03:00
parent cf08541256
commit dd47e74670
@@ -8,7 +8,7 @@ import type { ISimpleFlight } from "../../types.js";
// Match the router mock convention used across the project.
// Forward the ref so parent-held refs to list items still resolve to DOM nodes.
vi.mock("@modern-js/runtime/router", () => ({
Link: forwardRef<HTMLAnchorElement, { children: React.ReactNode; to: string; [k: string]: unknown }>(
Link: forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement> & { to: string }>(
({ children, to, ...props }, ref) => (
<a ref={ref} href={to} {...props}>{children}</a>
),