authorgravatar for crazywolf132@gmail.com0x1f99d <crazywolf132@gmail.com> 2026-03-09 14:36:03+11:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-08 20:36:03-07:00
log3738373aa5ff0fff074ecb95686ef952c209957e
tree1d655b2f7fe623456617e8f562d1ef6004b94280
parent9b9006fed571dbeb1c810493500a679a49a2ba38
signature Signed by PGP key B5690EEEBB952194

fix(server): use waitForPush in terminal event broadcast test to prevent flaky failure (#606)

The terminal RPC test used raw waitForMessage to receive the expected terminal.event push, but a server.configUpdated push from the keybindings file watcher can arrive first depending on OS timing. Replace with the existing waitForPush helper that filters by channel.

1 files changed, 1 insertions(+), 3 deletions(-)

apps/server/src/wsServer.test.ts+1-3
...@@ -1333,9 +1333,7 @@ describe("WebSocket Server", () => {...@@ -1333,9 +1333,7 @@ describe("WebSocket Server", () => {
1333 };1333 };
1334 terminalManager.emitEvent(manualEvent);1334 terminalManager.emitEvent(manualEvent);
13351335
1336 const push = (await waitForMessage(ws)) as WsPush;1336 const push = await waitForPush(ws, WS_CHANNELS.terminalEvent);
1337 expect(push.type).toBe("push");
1338 expect(push.channel).toBe(WS_CHANNELS.terminalEvent);
1339 expect((push.data as TerminalEvent).type).toBe("output");1337 expect((push.data as TerminalEvent).type).toBe("output");
1340 });1338 });
13411339