diff --git a/tests/unit/quota-preflight.test.ts b/tests/unit/quota-preflight.test.ts index 02e8ab314b..c073a11bff 100644 --- a/tests/unit/quota-preflight.test.ts +++ b/tests/unit/quota-preflight.test.ts @@ -82,9 +82,9 @@ test("preflightQuota warns but proceeds when usage is above the warning threshol test("preflightQuota blocks when usage reaches the exhaustion threshold", async () => { const infos = []; registerQuotaFetcher("provider-exhausted", async () => ({ - used: 95, + used: 99, total: 100, - percentUsed: 0.95, + percentUsed: 0.99, })); const result = await withPatchedConsole( @@ -101,7 +101,7 @@ test("preflightQuota blocks when usage reaches the exhaustion threshold", async assert.deepEqual(result, { proceed: false, reason: "quota_exhausted", - quotaPercent: 0.95, + quotaPercent: 0.99, resetAt: null, }); assert.equal(infos.length, 1); diff --git a/tests/unit/sse-auth.test.ts b/tests/unit/sse-auth.test.ts index 2add1820ef..cafcbf013b 100644 --- a/tests/unit/sse-auth.test.ts +++ b/tests/unit/sse-auth.test.ts @@ -169,9 +169,9 @@ test("getProviderCredentialsWithQuotaPreflight skips exhausted preflight account const quotaPreflight = await import("../../open-sse/services/quotaPreflight.ts"); quotaPreflight.registerQuotaFetcher("openai", async (connectionId) => ({ - used: connectionId === blocked.id ? 96 : 40, + used: connectionId === blocked.id ? 99 : 40, total: 100, - percentUsed: connectionId === blocked.id ? 0.96 : 0.4, + percentUsed: connectionId === blocked.id ? 0.99 : 0.4, })); const selected = await auth.getProviderCredentialsWithQuotaPreflight("openai");