Skip to content

Commit 6f1be84

Browse files
committed
fix tests
1 parent 1c26001 commit 6f1be84

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/core/webview/__tests__/ClineProvider.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2416,10 +2416,10 @@ describe("ClineProvider - Router Models", () => {
24162416
litellm: mockModels,
24172417
ollama: {},
24182418
lmstudio: {},
2419+
archgw: mockModels,
24192420
},
24202421
})
24212422
})
2422-
24232423
test("handles requestRouterModels with individual provider failures", async () => {
24242424
await provider.resolveWebviewView(mockWebviewView)
24252425
const messageHandler = (mockWebviewView.webview.onDidReceiveMessage as any).mock.calls[0][0]
@@ -2432,6 +2432,8 @@ describe("ClineProvider - Router Models", () => {
24322432
unboundApiKey: "unbound-key",
24332433
litellmApiKey: "litellm-key",
24342434
litellmBaseUrl: "http://localhost:4000",
2435+
// archgwApiKey: "archgw-key",
2436+
// archgwBaseUrl: "http://localhost:12000/v1",
24352437
},
24362438
} as any)
24372439

@@ -2447,6 +2449,7 @@ describe("ClineProvider - Router Models", () => {
24472449
.mockResolvedValueOnce(mockModels) // glama success
24482450
.mockRejectedValueOnce(new Error("Unbound API error")) // unbound fail
24492451
.mockRejectedValueOnce(new Error("LiteLLM connection failed")) // litellm fail
2452+
.mockResolvedValueOnce(mockModels) // archgw success
24502453

24512454
await messageHandler({ type: "requestRouterModels" })
24522455

@@ -2461,6 +2464,7 @@ describe("ClineProvider - Router Models", () => {
24612464
ollama: {},
24622465
lmstudio: {},
24632466
litellm: {},
2467+
archgw: mockModels,
24642468
},
24652469
})
24662470

@@ -2571,6 +2575,7 @@ describe("ClineProvider - Router Models", () => {
25712575
litellm: {},
25722576
ollama: {},
25732577
lmstudio: {},
2578+
archgw: mockModels,
25742579
},
25752580
})
25762581
})

src/core/webview/__tests__/webviewMessageHandler.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ describe("webviewMessageHandler - requestRouterModels", () => {
153153
litellm: mockModels,
154154
ollama: {},
155155
lmstudio: {},
156+
archgw: mockModels,
156157
},
157158
})
158159
})
@@ -240,6 +241,7 @@ describe("webviewMessageHandler - requestRouterModels", () => {
240241
litellm: {},
241242
ollama: {},
242243
lmstudio: {},
244+
archgw: mockModels,
243245
},
244246
})
245247
})
@@ -277,6 +279,7 @@ describe("webviewMessageHandler - requestRouterModels", () => {
277279
litellm: {},
278280
ollama: {},
279281
lmstudio: {},
282+
archgw: mockModels,
280283
},
281284
})
282285

0 commit comments

Comments
 (0)