Skip to content

Commit fe37f58

Browse files
committed
fix(server): use waitForPush in terminal event broadcast test to prevent flaky failures
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 parent 39f6570 commit fe37f58

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

apps/server/src/wsServer.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,9 +1333,7 @@ describe("WebSocket Server", () => {
13331333
};
13341334
terminalManager.emitEvent(manualEvent);
13351335

1336-
const push = (await waitForMessage(ws)) as WsPush;
1337-
expect(push.type).toBe("push");
1338-
expect(push.channel).toBe(WS_CHANNELS.terminalEvent);
1336+
const push = await waitForPush(ws, WS_CHANNELS.terminalEvent);
13391337
expect((push.data as TerminalEvent).type).toBe("output");
13401338
});
13411339

0 commit comments

Comments
 (0)