Skip to content

Commit 586f346

Browse files
committed
test(agents): complete in-memory session manager fixture
1 parent ea233d7 commit 586f346

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/agents/embedded-agent-runner/run/attempt-spawn-workspace.test-support.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function normalizeMockProviderId(providerId?: string): string {
6767
}
6868

6969
type SessionManagerMocks = {
70+
getSessionTarget: Mock<() => undefined>;
7071
getLeafEntry: UnknownMock;
7172
getEntry: UnknownMock;
7273
getBoundaryCount: UnknownMock;
@@ -271,6 +272,7 @@ const hoisted = vi.hoisted((): AttemptSpawnWorkspaceHoisted => {
271272
const embeddedSystemPromptInputs: unknown[] = [];
272273
const trajectoryEvents: CapturedTrajectoryEvent[] = [];
273274
const sessionManager = {
275+
getSessionTarget: vi.fn(() => undefined),
274276
getLeafEntry: vi.fn(() => null),
275277
getEntry: vi.fn(() => undefined),
276278
getBoundaryCount: vi.fn(() => 0),
@@ -1134,6 +1136,7 @@ export function resetEmbeddedAttemptHarness(
11341136
hoisted.systemPromptTexts.length = 0;
11351137
hoisted.embeddedSystemPromptInputs.length = 0;
11361138
hoisted.trajectoryEvents.length = 0;
1139+
hoisted.sessionManager.getSessionTarget.mockReset().mockReturnValue(undefined);
11371140
hoisted.sessionManager.getLeafEntry.mockReset().mockReturnValue(null);
11381141
hoisted.sessionManager.getEntry.mockReset().mockReturnValue(undefined);
11391142
hoisted.sessionManager.getBoundaryCount.mockReset().mockReturnValue(0);

0 commit comments

Comments
 (0)