Skip to content

Commit 5876976

Browse files
committed
fix: updating tests in Gemini and Vertex to adjust to the new error logging
1 parent 5f8d0c2 commit 5876976

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/api/providers/__tests__/gemini.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Anthropic } from "@anthropic-ai/sdk"
44

55
import { type ModelInfo, geminiDefaultModelId } from "@roo-code/types"
66

7+
import { t } from "i18next"
78
import { GeminiHandler } from "../gemini"
89

910
const GEMINI_20_FLASH_THINKING_NAME = "gemini-2.0-flash-thinking-exp-1219"
@@ -129,7 +130,7 @@ describe("GeminiHandler", () => {
129130
;(handler["client"].models.generateContent as any).mockRejectedValue(mockError)
130131

131132
await expect(handler.completePrompt("Test prompt")).rejects.toThrow(
132-
"Gemini completion error: Gemini API error",
133+
t("common:errors.gemini.generate_complete_prompt", { error: "Gemini API error" }),
133134
)
134135
})
135136

src/api/providers/__tests__/vertex.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Anthropic } from "@anthropic-ai/sdk"
77

88
import { ApiStreamChunk } from "../../transform/stream"
99

10+
import { t } from "i18next"
1011
import { VertexHandler } from "../vertex"
1112

1213
describe("VertexHandler", () => {
@@ -105,7 +106,7 @@ describe("VertexHandler", () => {
105106
;(handler["client"].models.generateContent as any).mockRejectedValue(mockError)
106107

107108
await expect(handler.completePrompt("Test prompt")).rejects.toThrow(
108-
"Gemini completion error: Vertex API error",
109+
t("common:errors.gemini.generate_complete_prompt", { error: "Vertex API error" }),
109110
)
110111
})
111112

0 commit comments

Comments
 (0)