From 61e54ded3c8f63fbb0d397e9e84f3f6095e86cc4 Mon Sep 17 00:00:00 2001 From: Jordan Hewitt Date: Mon, 3 Mar 2025 17:28:35 -0800 Subject: [PATCH] start mock of file bytes. --- components/ui/__tests__/Settings.spec.tsx | 17 +++++++++++++++++ translation_terrace.db | Bin 24576 -> 24576 bytes 2 files changed, 17 insertions(+) diff --git a/components/ui/__tests__/Settings.spec.tsx b/components/ui/__tests__/Settings.spec.tsx index e2711a3..b4825d0 100644 --- a/components/ui/__tests__/Settings.spec.tsx +++ b/components/ui/__tests__/Settings.spec.tsx @@ -8,6 +8,23 @@ import { Knex } from "knex"; const RENDER_TIME = 1000; +jest.mock('@/app/lib/whisper', () => { + const originalModule = jest.requireActual('@/app/lib/whisper'); + + return { + ...originalModule, + Whisper: class { + constructor(...args) { + originalModule.Whisper.apply(this, args); + } + + targetFile = { + bytes: jest.fn().mockReturnValue(new Uint8Array([/* mock data */])), + }; + }, + }; +}); + jest.mock("@/app/i18n/api", () => { class LanguageServer { fetchLanguages = () => { diff --git a/translation_terrace.db b/translation_terrace.db index 6b3da6cbf12a3dd64ac7657acb8387385bfdd04d..1bee6945684e97164c926edb040b977c3699b446 100644 GIT binary patch delta 102 zcmZoTz}Rqrae}nqa|Q+mHYjES(z7P&7&AWKn2;^csJ8ixyp#Z&nm8k~Dd*$~d?K3+ zI0cx$^WWVpXmF8VPJ)S*!I*&|qokyu*h*hNwIVUMASYEXIX{=3kyUW>Z+}(+00rY3 Aa{vGU delta 132 zcmZoTz}Rqrae}nqSq26MHYjES(p?jEj2X{vOvsjJRN8z-UP^#XNt}_{lymX~K9NlZ zoC3`I`EPF)6xhsfBgM!nXw1NnnwL>hQc!HAub*0xm|KvOs+XLfE5(Fc4rmGI=HLFT F0swY}BKZIS