From 863ffe83a6d717d2dba6f0fa2b57b4a36061a26c Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Fri, 18 Sep 2026 02:00:08 +0800 Subject: [PATCH] test(desktop): type the application path mock as string The shell asset regression substitutes a real package path through getAppPath, but the shared test harness inferred only the literal desktop-test-app. Vitest executed the test successfully while the repository TypeScript build rejected the path override. Declare the mock return type as string to match Electron getAppPath and permit both fixture and real package paths. This changes only test typing; it adds no casts or production behavior. The focused production-routing regression passes after the correction. --- apps/desktop/tests/main-startup.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/tests/main-startup.spec.ts b/apps/desktop/tests/main-startup.spec.ts index 8b6f69bf1e..93f7abb0b8 100644 --- a/apps/desktop/tests/main-startup.spec.ts +++ b/apps/desktop/tests/main-startup.spec.ts @@ -118,7 +118,7 @@ const harness = await vi.hoisted(async () => { whenReady: () => Promise.resolve(), getLocale: (): string => 'en-US', getVersion: () => '1.0.0', - getAppPath: () => 'desktop-test-app', + getAppPath: (): string => 'desktop-test-app', setAboutPanelOptions: vi.fn<(options: Electron.AboutPanelOptionsOptions) => void>(), requestSingleInstanceLock: () => true, exit: vi.fn(),