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:
@@ -59,6 +59,15 @@ describe("missingBundleForScript", () => {
|
||||
expect(missingBundleForScript("unknown_script")).toBeNull();
|
||||
});
|
||||
|
||||
it("does not gate built-in OCR through the legacy shared environment", () => {
|
||||
setInstalled([]);
|
||||
|
||||
expect(SCRIPT_BUNDLE_MAP).not.toHaveProperty("ocr");
|
||||
expect(SCRIPT_BUNDLE_MAP).not.toHaveProperty("ocr_pdf");
|
||||
expect(missingBundleForScript("ocr")).toBeNull();
|
||||
expect(missingBundleForScript("ocr_pdf.py")).toBeNull();
|
||||
});
|
||||
|
||||
it("fails closed when installed.json is missing", () => {
|
||||
// No setInstalled(): the file does not exist. Like the dispatcher, an
|
||||
// unreadable installed.json reads as "nothing installed", so a gated
|
||||
|
||||
Reference in New Issue
Block a user