diff --git a/tests/ipcMain/createWorkspace.test.ts b/tests/ipcMain/createWorkspace.test.ts index 9d20e3d723..edf0446408 100644 --- a/tests/ipcMain/createWorkspace.test.ts +++ b/tests/ipcMain/createWorkspace.test.ts @@ -818,7 +818,8 @@ exit 1 try { // Set up a real origin remote in the test repo - const originUrl = "https://github.com/example/test-repo.git"; + // Use example.com to avoid global git config rewrites (e.g. insteadOf https://github.com/) + const originUrl = "https://example.com/example/test-repo.git"; await execAsync(`git remote add origin ${originUrl}`, { cwd: tempGitRepo, }); diff --git a/tests/ipcMain/resumeStream.test.ts b/tests/ipcMain/resumeStream.test.ts index 1b295e40dc..b0edd8b442 100644 --- a/tests/ipcMain/resumeStream.test.ts +++ b/tests/ipcMain/resumeStream.test.ts @@ -161,8 +161,9 @@ describeIntegration("IpcMain resumeStream integration tests", () => { // Subscribe to chat channel to receive events env.mockIpcRenderer.send("workspace:chat:subscribe", workspaceId); - // Wait a moment for subscription to complete - await new Promise((resolve) => setTimeout(resolve, 100)); + // Wait for subscription to complete by waiting for caught-up event + const caughtUpEvent = await collector.waitForEvent("caught-up", 5000); + expect(caughtUpEvent).toBeDefined(); // Resume the stream (should continue from the summary message) const resumeResult = (await env.mockIpcRenderer.invoke( diff --git a/tests/ipcMain/runtimeExecuteBash.test.ts b/tests/ipcMain/runtimeExecuteBash.test.ts index 6656e5335b..2010bf28b2 100644 --- a/tests/ipcMain/runtimeExecuteBash.test.ts +++ b/tests/ipcMain/runtimeExecuteBash.test.ts @@ -296,10 +296,16 @@ describeIntegration("Runtime Bash Execution", () => { const responseText = extractTextFromEvents(events); // Verify command completed successfully (not timeout) - expect(responseText).toContain("test"); + // We primarily check bashOutput to ensure the tool executed and didn't hang const bashOutput = collectToolOutputs(events, "bash"); expect(bashOutput).toContain('"test": "data"'); + // responseText might be empty if the model decides not to comment on the output + // so we make this check optional or less strict if the tool output is correct + if (responseText) { + expect(responseText).toContain("test"); + } + // Verify command completed quickly (not hanging until timeout) expect(toolDuration).toBeGreaterThan(0); const maxDuration = 10000;