diff --git a/src/__tests__/models-cache.test.ts b/src/__tests__/models-cache.test.ts index 2791866..6f7c2ab 100644 --- a/src/__tests__/models-cache.test.ts +++ b/src/__tests__/models-cache.test.ts @@ -32,7 +32,7 @@ afterEach(() => { describe("Qoder model cache", () => { it.each([ ["global", ["Lite", "GLM5.2"]], - ["cn", ["Auto", "Qwen3.7-Max"]], + ["cn", ["Qwen3.7Plus"]], ] as const)("maps the %s recorded-format catalog to friendly picker ids", async (region, expectedIds) => { const interaction = loadLiveFixture(region).interactions.modelList; vi.stubGlobal("fetch", vi.fn().mockResolvedValue(responseFromFixture(interaction))); diff --git a/src/__tests__/stream.test.ts b/src/__tests__/stream.test.ts index 7e880c8..273b025 100644 --- a/src/__tests__/stream.test.ts +++ b/src/__tests__/stream.test.ts @@ -432,6 +432,10 @@ describe("streamQoder", () => { globalThis.fetch = vi.fn( (_url: URL | RequestInfo, init?: RequestInit) => new Promise((_resolve, reject) => { + if (init?.signal?.aborted) { + reject(new DOMException("Aborted", "AbortError")); + return; + } init?.signal?.addEventListener("abort", () => reject(new DOMException("Aborted", "AbortError")), { once: true, });