File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
webview-ui/src/components/chat/__tests__ Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 11import React from "react"
22import { render , screen } from "@testing-library/react"
33import TaskHeader from "../TaskHeader"
4-
5- // Mock the translation function
6- jest . mock ( "react-i18next" , ( ) => ( {
7- useTranslation : ( ) => ( { t : ( key : string ) => key } ) ,
8- } ) )
4+ import { ApiConfiguration } from "../../../../../src/shared/api"
95
106// Mock the vscode API
117jest . mock ( "@/utils/vscode" , ( ) => ( {
@@ -19,7 +15,9 @@ jest.mock("../../../context/ExtensionStateContext", () => ({
1915 useExtensionState : ( ) => ( {
2016 apiConfiguration : {
2117 apiProvider : "anthropic" ,
22- } ,
18+ apiKey : "test-api-key" , // Add relevant fields
19+ apiModelId : "claude-3-opus-20240229" , // Add relevant fields
20+ } as ApiConfiguration , // Optional: Add type assertion if ApiConfiguration is imported
2321 currentTaskItem : null ,
2422 } ) ,
2523} ) )
You can’t perform that action at this time.
0 commit comments