From 25230c88a09e1a0743370e4f897dd9b5f5287b29 Mon Sep 17 00:00:00 2001 From: Michael Yong Date: Mon, 24 Aug 2026 09:41:30 -0700 Subject: [PATCH] Harden plugin host watch test startup wait --- apps/host-daemon/src/plugin-host-manager.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/host-daemon/src/plugin-host-manager.test.ts b/apps/host-daemon/src/plugin-host-manager.test.ts index 9151dbbd6c..b99d8c8557 100644 --- a/apps/host-daemon/src/plugin-host-manager.test.ts +++ b/apps/host-daemon/src/plugin-host-manager.test.ts @@ -550,7 +550,8 @@ describe("PluginHostManager", () => { input: { rootPath: "/tmp/workspace", listenerDelayMs: 100 }, }); const call = manager.call(command); - await vi.waitFor(() => expect(watcher).toBeDefined()); + // This registration crosses a real worker process startup boundary. + await vi.waitFor(() => expect(watcher).toBeDefined(), { timeout: 5_000 }); watcher?.onReady(); await expect(call).resolves.toEqual({ output: { watching: true } }); await new Promise((resolve) => setTimeout(resolve, 100));