ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
CI / Typecheck, test & build (push) Failing after 2s
This commit is contained in:
@@ -47,7 +47,10 @@ function makeFetch(imageBytes: Buffer): typeof fetch {
|
||||
return new Response(imageBytes, { status: 200, headers: { "content-type": "image/jpeg" } });
|
||||
}
|
||||
if (urlStr.includes("/models/") && init?.method === "POST") {
|
||||
return new Response(JSON.stringify(FIXTURE_RESPONSE), { status: 200, headers: { "content-type": "application/json" } });
|
||||
return new Response(JSON.stringify(FIXTURE_RESPONSE), {
|
||||
status: 200,
|
||||
headers: { "content-type": "application/json" },
|
||||
});
|
||||
}
|
||||
return new Response("not found", { status: 404 });
|
||||
};
|
||||
@@ -126,10 +129,7 @@ describe("GeminiAamosClient", () => {
|
||||
fetchImpl: makeFetch(JPEG_BYTES),
|
||||
});
|
||||
|
||||
const result = await client.runTask(
|
||||
"DEDUPLICATE_INVENTORY",
|
||||
{ items: [] },
|
||||
);
|
||||
const result = await client.runTask("DEDUPLICATE_INVENTORY", { items: [] });
|
||||
|
||||
expect(result.status).toBe("failed");
|
||||
expect(result.error).toContain("DEDUPLICATE_INVENTORY");
|
||||
@@ -146,7 +146,12 @@ describe("GeminiAamosClient", () => {
|
||||
locationType: "fridge",
|
||||
marketLocale: "sv-SE",
|
||||
knownItems: [],
|
||||
} as unknown as { imageUrls: string[]; locationType: string; marketLocale: string; knownItems: string[] });
|
||||
} as unknown as {
|
||||
imageUrls: string[];
|
||||
locationType: string;
|
||||
marketLocale: string;
|
||||
knownItems: string[];
|
||||
});
|
||||
|
||||
expect(result.status).toBe("failed");
|
||||
expect(result.error).toContain("Kontraktsfel");
|
||||
|
||||
Reference in New Issue
Block a user