Skip to content

Commit 8b15799

Browse files
committed
test: type synthetic auth mocks
1 parent d670f9c commit 8b15799

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

extensions/codex/provider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ describe("codex provider", () => {
400400
});
401401

402402
it("keeps synthetic usage rate-limit reads on the default Codex auth bridge", async () => {
403-
const requestCodexAppServerJson = vi.fn(async () => ({
403+
const requestCodexAppServerJson = vi.fn(async (_params: unknown) => ({
404404
rateLimitsByLimitId: {},
405405
}));
406406
vi.doMock("./src/app-server/request.js", () => ({

src/infra/provider-usage.auth.plugin.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
55
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
6+
import type { ProviderSyntheticAuthResult } from "../plugins/provider-external-auth.types.js";
67

78
const resolveProviderUsageAuthWithPluginMock = vi.fn(
89
async (..._args: unknown[]): Promise<unknown> => null,
910
);
10-
const resolveProviderSyntheticAuthWithPluginMock = vi.fn(() => undefined);
11+
const resolveProviderSyntheticAuthWithPluginMock = vi.fn(
12+
(_params: unknown): ProviderSyntheticAuthResult | null | undefined => undefined,
13+
);
1114
const hasAnyAuthProfileStoreSourceMock = vi.fn(() => false);
1215
const ensureAuthProfileStoreMock = vi.fn(() => ({
1316
profiles: {},

0 commit comments

Comments
 (0)