Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/ipcMain/sendMessage.errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
configureTestRetries,
} from "./helpers";
import { createSharedRepo, cleanupSharedRepo, withSharedWorkspace } from "./sendMessageTestHelpers";
import { preloadTestModules } from "./setup";
import type { StreamDeltaEvent } from "../../src/common/types/stream";
import { IPC_CHANNELS } from "../../src/common/constants/ipc-constants";

Expand All @@ -40,9 +41,13 @@ const PROVIDER_CONFIGS: Array<[string, string]> = [
// - Longer running tests (tool calls, multiple edits) can take up to 30s
// - Test timeout values (in describe/test) should be 2-3x the expected duration

beforeAll(createSharedRepo);
afterAll(cleanupSharedRepo);
describeIntegration("IpcMain sendMessage integration tests", () => {
beforeAll(async () => {
await preloadTestModules();
await createSharedRepo();
});
afterAll(cleanupSharedRepo);

configureTestRetries(3);

// Run tests for each provider concurrently
Expand Down
9 changes: 8 additions & 1 deletion tests/ipcMain/streamErrorRecovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
* test the recovery path without relying on actual network failures.
*/

import { setupWorkspace, shouldRunIntegrationTests, validateApiKeys } from "./setup";
import {
setupWorkspace,
shouldRunIntegrationTests,
validateApiKeys,
preloadTestModules,
} from "./setup";
import {
sendMessageWithModel,
createEventCollector,
Expand Down Expand Up @@ -220,6 +225,8 @@ async function collectStreamUntil(
}

describeIntegration("Stream Error Recovery (No Amnesia)", () => {
beforeAll(preloadTestModules);

test.concurrent(
"should preserve exact prefix and continue from exact point after stream error",
async () => {
Expand Down