Compare commits

...

1 Commits

Author SHA1 Message Date
jackwener 311a2db14d fix: update BrowserBridge test to mock fetchDaemonStatus instead of isDaemonRunning
PR #712 refactored _ensureDaemon to use a single fetchDaemonStatus() call
instead of separate isDaemonRunning(). The test was still mocking the old
function, causing it to fall through to the spawn-daemon path and throw
the wrong error message.
2026-04-03 03:35:47 +08:00
+1 -1
View File
@@ -136,7 +136,7 @@ describe('BrowserBridge state', () => {
it('fails fast when daemon is running but extension is disconnected', async () => {
vi.spyOn(daemonClient, 'isExtensionConnected').mockResolvedValue(false);
vi.spyOn(daemonClient, 'isDaemonRunning').mockResolvedValue(true);
vi.spyOn(daemonClient, 'fetchDaemonStatus').mockResolvedValue({ extensionConnected: false } as any);
const bridge = new BrowserBridge();