mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: make OCR portable and reliable across AMD64 and ARM64 (#519)
* fix: make OCR portable and reliable * fix: harden OCR installation portability * fix: pin OCR partials across downloads * fix: make OCR execution reliably asynchronous * fix: harden OCR portability and docs routes * fix: preserve decoder and docs safeguards
This commit is contained in:
@@ -128,4 +128,18 @@ describe("multipartParts", () => {
|
||||
|
||||
await generator.return(undefined);
|
||||
});
|
||||
|
||||
it("honors a route-specific two-file limit", async () => {
|
||||
const body = multipartBody([
|
||||
{ name: "index", filename: "ocr-runtime-index.json", content: "index" },
|
||||
{ name: "archive", filename: "ocr-runtime.tar.gz", content: "archive" },
|
||||
{ name: "extra", filename: "extra.bin", content: "unexpected" },
|
||||
]);
|
||||
|
||||
await expect(async () => {
|
||||
for await (const part of multipartParts(fakeRequest(body), { files: 2 })) {
|
||||
if (part.type === "file") await drain(part.file);
|
||||
}
|
||||
}).rejects.toThrow("files limit");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user