Skip to content

Commit 16e3d88

Browse files
committed
test(web): assert the stored suspendedReason before testing its clear
1 parent f41d83a commit 16e3d88

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/pythinker-web/test/agent-event-projector.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,9 @@ describe('background subagent task registration', () => {
647647
it('clears suspendedReason when a later subagent.suspended carries no reason', () => {
648648
const projector = createAgentProjector();
649649
projector.project('subagent.spawned', { subagentId: 'agent-1', description: 'Explore repo' }, 's1');
650-
projector.project('subagent.suspended', { subagentId: 'agent-1', reason: 'waiting for input' }, 's1');
650+
const first = projector.project('subagent.suspended', { subagentId: 'agent-1', reason: 'waiting for input' }, 's1');
651+
expect(first).toHaveLength(1);
652+
expect((first[0] as { task: Record<string, unknown> }).task['suspendedReason']).toBe('waiting for input');
651653

652654
const events = projector.project('subagent.suspended', { subagentId: 'agent-1' }, 's1');
653655

0 commit comments

Comments
 (0)