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.
This commit is contained in:
1 parent
9b9006fed5
commit
3738373aa5
1 file changed
+1
-3
@@ -1333,9 +1333,7 @@ describe("WebSocket Server", () => {
|
||||
};
|
||||
terminalManager.emitEvent(manualEvent);
|
||||
|
||||
const push = (await waitForMessage(ws)) as WsPush;
|
||||
expect(push.type).toBe("push");
|
||||
expect(push.channel).toBe(WS_CHANNELS.terminalEvent);
|
||||
const push = await waitForPush(ws, WS_CHANNELS.terminalEvent);
|
||||
expect((push.data as TerminalEvent).type).toBe("output");
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user