Skip to content

Commit a865df1

Browse files
committed
test(webview): type mutation fixtures precisely
1 parent 2f8e3ad commit a865df1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎webview-ui/src/utils/__tests__/validate.spec.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ describe("Model Validation Functions", () => {
318318
it("formats a reserved-key result without a key list", () => {
319319
const t = vi.fn((_key, options) => options?.keys ?? "missing")
320320

321-
expect(formatOpenAiExtraBodyValidationError({ success: false, reason: "reservedKeys" }, t)).toBe("")
321+
expect(formatOpenAiExtraBodyValidationError({ success: false, reason: "reservedKeys", data: {} }, t)).toBe(
322+
"",
323+
)
322324
expect(t).toHaveBeenCalledWith("settings:validation.openAiExtraBody.reservedKeys", { keys: "" })
323325
})
324326

@@ -327,7 +329,7 @@ describe("Model Validation Functions", () => {
327329

328330
expect(
329331
formatOpenAiExtraBodyValidationError(
330-
{ success: false, reason: "reservedKeys", reservedKeys: ["model", "stream"] },
332+
{ success: false, reason: "reservedKeys", data: {}, reservedKeys: ["model", "stream"] },
331333
t,
332334
),
333335
).toBe("model, stream")

0 commit comments

Comments
 (0)