From 998cd3c32e7f32c9e3df8be15c9744b35ca535c0 Mon Sep 17 00:00:00 2001 From: cte Date: Fri, 7 Mar 2025 21:52:11 -0800 Subject: [PATCH] Fix tests --- .../settings/__tests__/ApiOptions.test.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx b/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx index 364e57a715..008c5819db 100644 --- a/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx @@ -35,6 +35,31 @@ jest.mock("vscrui", () => ({ Pane: ({ children }: any) =>
{children}
, })) +// Mock @shadcn/ui components +jest.mock("@/components/ui", () => ({ + Select: ({ children, value, onValueChange }: any) => ( +
+ +
+ ), + SelectTrigger: ({ children }: any) =>
{children}
, + SelectValue: ({ children }: any) =>
{children}
, + SelectContent: ({ children }: any) =>
{children}
, + SelectGroup: ({ children }: any) =>
{children}
, + SelectItem: ({ children, value }: any) => ( + + ), + Button: ({ children, onClick }: any) => ( + + ), +})) + jest.mock("../TemperatureControl", () => ({ TemperatureControl: ({ value, onChange }: any) => (