Skip to content

Commit 2ec5a24

Browse files
committed
fix integration tests
1 parent a608663 commit 2ec5a24

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/ipcMain/sendMessage.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,22 @@ describeIntegration("IpcMain sendMessage integration tests", () => {
9999
const collector = createEventCollector(env.sentEvents, workspaceId);
100100
await collector.waitForEvent("stream-start", 5000);
101101

102-
// Use interruptStream() to interrupt
103-
const interruptResult = await env.mockIpcRenderer.invoke(
102+
// Use interruptStream() to soft-interrupt
103+
const softInterruptResult = await env.mockIpcRenderer.invoke(
104104
IPC_CHANNELS.WORKSPACE_INTERRUPT_STREAM,
105105
workspaceId
106106
);
107107

108108
// Should succeed (interrupt is not an error)
109-
expect(interruptResult.success).toBe(true);
109+
expect(softInterruptResult.success).toBe(true);
110+
111+
112+
// Then hard-interrupt
113+
const hardInterruptResult = await env.mockIpcRenderer.invoke(
114+
IPC_CHANNELS.WORKSPACE_INTERRUPT_STREAM,
115+
workspaceId
116+
)
117+
expect(hardInterruptResult.success).toBe(true);
110118

111119
// Wait for abort or end event
112120
const abortOrEndReceived = await waitFor(() => {

0 commit comments

Comments
 (0)