Skip to content

An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.

test(extension): give the one-socket reconnect test the time a fresh worker import, the link and the retry window need once the whole suite shares the machine

Shahriar485e855f7d07
diff --git a/src/lib/bridge/socket.test.ts b/src/lib/bridge/socket.test.ts
index 515dd9a..6239926 100644
--- a/src/lib/bridge/socket.test.ts
+++ b/src/lib/bridge/socket.test.ts
@@ -46,6 +46,8 @@ const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
const connections = () => readFileSync(logPath, 'utf8').match(/connected from/g)?.length ?? 0;
/** Past the first retry the backoff can schedule, which lands within a second. */
const RETRY_WINDOW_MS = 1_200;
+/** A fresh import of the worker, up to 3 s for the link and the retry window: past vitest's 5 s once the whole suite shares the machine. */
+const TEST_TIMEOUT_MS = 20_000;
async function daemonState(): Promise<DaemonState | undefined> {
return (await fakeBrowser.storage.session.get('browsentic/daemon'))['browsentic/daemon'] as DaemonState | undefined;
@@ -86,6 +88,6 @@ describe('keeping one link to the daemon', () => {
await wait(RETRY_WINDOW_MS);
expect(connections() - before).toBe(1);
expect((await daemonState())?.connected).toBe(true);
- });
+ }, TEST_TIMEOUT_MS);
});