mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
test(medications): hand the label upload a plain byte array
This commit is contained in:
1 parent
b35da281aa
commit
c5da5debb2
1 file changed
+4
-1
@@ -618,7 +618,10 @@ describe("POST /api/medications/{id}/ingredients/extract", () => {
|
||||
const { POST } =
|
||||
await import("@/app/api/medications/[id]/ingredients/extract/route");
|
||||
const form = new FormData();
|
||||
form.append("file", new File([bytes], "label.png", { type: "image/png" }));
|
||||
form.append(
|
||||
"file",
|
||||
new File([new Uint8Array(bytes)], "label.png", { type: "image/png" }),
|
||||
);
|
||||
const res = await (POST as Handler)(
|
||||
new NextRequest(
|
||||
`http://localhost/api/medications/${medicationId}/ingredients/extract`,
|
||||
|
||||
Reference in new issue
Block a user