Skip to content

Commit 2ae4393

Browse files
James Mtendamemacursoragent
andcommitted
test(zoo-gateway): mock cached-token + clear-token auth helpers
The downstream stack (settings-ui) calls getCachedZooCodeToken and clearZooCodeToken from the auth handler. CI on stacked PRs merges base into head so this spec runs against the cached-token-aware handler; expand the auth module mock so the auth guard test exercises the real throw path instead of vitest's missing-mock-export error. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4bed46a commit 2ae4393

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/api/providers/__tests__/zoo-gateway.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ vitest.mock("../fetchers/modelCache", () => ({
4444

4545
vitest.mock("../../../services/zoo-code-auth", () => ({
4646
getZooCodeBaseUrl: vitest.fn(() => "https://www.zoocode.dev"),
47+
getCachedZooCodeToken: vitest.fn(() => undefined),
48+
clearZooCodeToken: vitest.fn(async () => undefined),
4749
}))
4850

4951
vitest.mock("../../transform/caching/vercel-ai-gateway", () => ({

src/core/webview/webviewMessageHandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ export const webviewMessageHandler = async (
931931
poe: {},
932932
deepseek: {},
933933
"opencode-go": {},
934-
"zoo-gateway": {},
935934
}
936935

937936
const safeGetModels = async (options: GetModelsOptions): Promise<ModelRecord> => {

0 commit comments

Comments
 (0)