mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix tests
This commit is contained in:
parent
66e036eaa2
commit
dd7d9824ba
3 changed files with 16 additions and 16 deletions
|
|
@ -7,17 +7,13 @@ interface VSCodeButtonLinkProps {
|
|||
[key: string]: any
|
||||
}
|
||||
|
||||
const VSCodeButtonLink: React.FC<VSCodeButtonLinkProps> = ({ href, children, ...props }) => {
|
||||
return (
|
||||
<a
|
||||
href={href}
|
||||
style={{
|
||||
textDecoration: "none",
|
||||
color: "inherit",
|
||||
}}>
|
||||
<VSCodeButton {...props}>{children}</VSCodeButton>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
export default VSCodeButtonLink
|
||||
export const VSCodeButtonLink = ({ href, children, ...props }: VSCodeButtonLinkProps) => (
|
||||
<a
|
||||
href={href}
|
||||
style={{
|
||||
textDecoration: "none",
|
||||
color: "inherit",
|
||||
}}>
|
||||
<VSCodeButton {...props}>{children}</VSCodeButton>
|
||||
</a>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import {
|
|||
import { ExtensionMessage } from "../../../../src/shared/ExtensionMessage"
|
||||
|
||||
import { vscode } from "../../utils/vscode"
|
||||
import VSCodeButtonLink from "../common/VSCodeButtonLink"
|
||||
import { VSCodeButtonLink } from "../common/VSCodeButtonLink"
|
||||
import { ModelInfoView } from "./ModelInfoView"
|
||||
import { ModelPicker } from "./ModelPicker"
|
||||
import { TemperatureControl } from "./TemperatureControl"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
// npx jest src/components/settings/__tests__/ApiOptions.test.ts
|
||||
|
||||
import { render, screen } from "@testing-library/react"
|
||||
import ApiOptions from "../ApiOptions"
|
||||
|
||||
import { ExtensionStateContextProvider } from "../../../context/ExtensionStateContext"
|
||||
import ApiOptions from "../ApiOptions"
|
||||
|
||||
// Mock VSCode components
|
||||
jest.mock("@vscode/webview-ui-toolkit/react", () => ({
|
||||
|
|
@ -13,6 +16,7 @@ jest.mock("@vscode/webview-ui-toolkit/react", () => ({
|
|||
VSCodeLink: ({ children, href }: any) => <a href={href}>{children}</a>,
|
||||
VSCodeRadio: ({ children, value, checked }: any) => <input type="radio" value={value} checked={checked} />,
|
||||
VSCodeRadioGroup: ({ children }: any) => <div>{children}</div>,
|
||||
VSCodeButton: ({ children }: any) => <div>{children}</div>,
|
||||
}))
|
||||
|
||||
// Mock other components
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue