File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
webview-ui/src/components/chat/__tests__ Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ jest.mock("react-i18next", () => ({
1313 useTranslation : ( ) => ( {
1414 t : ( key : string ) => key , // Simple mock that returns the key
1515 } ) ,
16+ // Mock initReactI18next to prevent initialization errors in tests
17+ initReactI18next : {
18+ type : "3rdParty" ,
19+ init : jest . fn ( ) ,
20+ } ,
1621} ) )
1722
1823// Mock the vscode API
@@ -35,7 +40,7 @@ jest.mock("@src/context/ExtensionStateContext", () => ({
3540 apiKey : "test-api-key" , // Add relevant fields
3641 apiModelId : "claude-3-opus-20240229" , // Add relevant fields
3742 } as ProviderSettings , // Optional: Add type assertion if ProviderSettings is imported
38- currentTaskItem : { id : "test-task-id" } , // Add a mock currentTaskItem for the condense button
43+ currentTaskItem : { id : "test-task-id" } ,
3944 } ) ,
4045} ) )
4146
You can’t perform that action at this time.
0 commit comments