diff --git a/src/app/(auth-routes)/login/page.test.tsx b/src/app/(auth-routes)/login/page.test.tsx index 30ae2d989..2480409b4 100644 --- a/src/app/(auth-routes)/login/page.test.tsx +++ b/src/app/(auth-routes)/login/page.test.tsx @@ -24,13 +24,15 @@ type FieldType = { }; vi.mock("~/components/ui/form", () => ({ - Form: ({ children }: { children: React.ReactNode }) =>
{children}
, - FormField: ({ + Form: function Form({ children }: { children: React.ReactNode }) { + return
{children}
; + }, + FormField: function FormField({ render, }: { render: (properties: { field: FieldType }) => React.ReactNode; - }) => - render({ + }) { + return render({ field: { onChange: vi.fn(), onBlur: vi.fn(), @@ -38,17 +40,27 @@ vi.mock("~/components/ui/form", () => ({ name: "", ref: () => {}, }, - }), - FormItem: ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - FormLabel: ({ children }: { children: React.ReactNode }) => ( - - ), - FormControl: ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - FormMessage: ({ children }: { children: React.ReactNode }) => children, + }); + }, + FormItem: function FormItem({ children }: { children: React.ReactNode }) { + return
{children}
; + }, + FormLabel: function FormLabel({ children }: { children: React.ReactNode }) { + return ; + }, + FormControl: React.forwardRef(function FormControl( + { children }: { children: React.ReactNode }, + reference: React.Ref, + ) { + return
{children}
; + }), + FormMessage: function FormMessage({ + children, + }: { + children: React.ReactNode; + }) { + return children; + }, })); vi.mock("~/components/ui/input", () => ({