Skip to content

The agent that grows with you

style(desktop): use top-level BrowserWindow type import in find-in-page tests

Chen Jin2d51f6d02250
diff --git a/apps/desktop/electron/find-in-page.test.ts b/apps/desktop/electron/find-in-page.test.ts
index 069f2809f9e..a21db92d77a 100644
--- a/apps/desktop/electron/find-in-page.test.ts
+++ b/apps/desktop/electron/find-in-page.test.ts
@@ -7,6 +7,7 @@
import assert from 'node:assert/strict'
import { EventEmitter } from 'node:events'
+import type { BrowserWindow } from 'electron'
import { describe, test } from 'vitest'
import { formatFoundInPage, installFindShortcut, installFoundInPageForwarder, performFind, stopFind } from './find-in-page'
@@ -225,7 +226,7 @@ describe('installFoundInPageForwarder', () => {
describe('installFindShortcut', () => {
// Minimal BrowserWindow stub: only `webContents` is touched.
function makeFakeWindow(wc: FakeWebContents) {
- return { webContents: asWC(wc) } as unknown as import('electron').BrowserWindow
+ return { webContents: asWC(wc) } as unknown as BrowserWindow
}
test('sends hermes:open-find-bar on Ctrl+F (Linux/Windows) and prevents default', () => {