* Create a mock BrowserWindow for tests. * Note: Events are now consumed via ORPC subscriptions (StreamCollector), * not via windowService.send(). This mock just satisfies the window service API.
()
| 33 | * not via windowService.send(). This mock just satisfies the window service API. |
| 34 | */ |
| 35 | function createMockBrowserWindow(): BrowserWindow { |
| 36 | const mockWindow = { |
| 37 | webContents: { |
| 38 | send: jest.fn(), |
| 39 | openDevTools: jest.fn(), |
| 40 | } as unknown as WebContents, |
| 41 | isDestroyed: jest.fn(() => false), |
| 42 | isMinimized: jest.fn(() => false), |
| 43 | restore: jest.fn(), |
| 44 | focus: jest.fn(), |
| 45 | loadURL: jest.fn(), |
| 46 | on: jest.fn(), |
| 47 | setTitle: jest.fn(), |
| 48 | } as unknown as BrowserWindow; |
| 49 | |
| 50 | return mockWindow; |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Create a test environment with temporary config and service container |
no outgoing calls
no test coverage detected