Skip to content

Commit 6f2b189

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 df5be1d commit 6f2b189

1 file changed

Lines changed: 2 additions & 0 deletions

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", () => ({

0 commit comments

Comments
 (0)