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.
This commit is contained in:
Tianyi Cui committed 2026-09-18 02:00:08 +08:00
1 parent 64c669fc79
commit 863ffe83a6
1 file changed
+1 -1
+1 -1
View File
@@ -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(),