Tests: clean chutes fetch spies

This commit is contained in:
Friederike Seiler
2026-01-12 01:08:52 +01:00
committed by Peter Steinberger
parent 0efcfc0864
commit 3271ff1d6e
2 changed files with 4 additions and 4 deletions

View File

@@ -73,8 +73,8 @@ describe("auth-profiles (chutes)", () => {
};
await fs.writeFile(authProfilePath, `${JSON.stringify(store)}\n`);
const fetchSpy = vi.fn(async (input: RequestInfo | URL) => {
const url = String(input);
const fetchSpy = vi.fn(async (input: string | URL) => {
const url = typeof input === "string" ? input : input.toString();
if (url !== CHUTES_TOKEN_ENDPOINT)
return new Response("not found", { status: 404 });
return new Response(

View File

@@ -359,8 +359,8 @@ describe("applyAuthChoice", () => {
process.env.SSH_TTY = "1";
process.env.CHUTES_CLIENT_ID = "cid_test";
const fetchSpy = vi.fn(async (input: RequestInfo | URL) => {
const url = String(input);
const fetchSpy = vi.fn(async (input: string | URL) => {
const url = typeof input === "string" ? input : input.toString();
if (url === "https://api.chutes.ai/idp/token") {
return new Response(
JSON.stringify({