mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Fix tests
This commit is contained in:
parent
ebacc14b48
commit
998cd3c32e
1 changed files with 25 additions and 0 deletions
|
|
@ -35,6 +35,31 @@ jest.mock("vscrui", () => ({
|
|||
Pane: ({ children }: any) => <div>{children}</div>,
|
||||
}))
|
||||
|
||||
// Mock @shadcn/ui components
|
||||
jest.mock("@/components/ui", () => ({
|
||||
Select: ({ children, value, onValueChange }: any) => (
|
||||
<div className="select-mock">
|
||||
<select value={value} onChange={(e) => onValueChange && onValueChange(e.target.value)}>
|
||||
{children}
|
||||
</select>
|
||||
</div>
|
||||
),
|
||||
SelectTrigger: ({ children }: any) => <div className="select-trigger-mock">{children}</div>,
|
||||
SelectValue: ({ children }: any) => <div className="select-value-mock">{children}</div>,
|
||||
SelectContent: ({ children }: any) => <div className="select-content-mock">{children}</div>,
|
||||
SelectGroup: ({ children }: any) => <div className="select-group-mock">{children}</div>,
|
||||
SelectItem: ({ children, value }: any) => (
|
||||
<option value={value} className="select-item-mock">
|
||||
{children}
|
||||
</option>
|
||||
),
|
||||
Button: ({ children, onClick }: any) => (
|
||||
<button onClick={onClick} className="button-mock">
|
||||
{children}
|
||||
</button>
|
||||
),
|
||||
}))
|
||||
|
||||
jest.mock("../TemperatureControl", () => ({
|
||||
TemperatureControl: ({ value, onChange }: any) => (
|
||||
<div data-testid="temperature-control">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue