Skip to content

Commit c67e13c

Browse files
committed
Fix tests
1 parent f00d1cb commit c67e13c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

backend/src/__tests__/subagent-streaming.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,25 +162,29 @@ describe('Subagent Streaming', () => {
162162
await result
163163

164164
// Verify that subagent streaming messages were sent
165-
expect(mockSendSubagentChunk).toHaveBeenCalledTimes(2)
165+
expect(mockSendSubagentChunk).toHaveBeenCalledTimes(4)
166166

167-
// Check first streaming chunk
168-
expect(mockSendSubagentChunk).toHaveBeenNthCalledWith(1, {
167+
// First streaming chunk is a labled divider
168+
169+
// Check second streaming chunk
170+
expect(mockSendSubagentChunk).toHaveBeenNthCalledWith(2, {
169171
userInputId: 'test-input',
170172
agentId: expect.any(String),
171173
agentType: 'thinker',
172174
chunk: 'Thinking about the problem...',
173175
prompt: 'Think about this problem',
174176
})
175177

176-
// Check second streaming chunk
177-
expect(mockSendSubagentChunk).toHaveBeenNthCalledWith(2, {
178+
// Check third streaming chunk
179+
expect(mockSendSubagentChunk).toHaveBeenNthCalledWith(3, {
178180
userInputId: 'test-input',
179181
agentId: expect.any(String),
180182
agentType: 'thinker',
181183
chunk: 'Found a solution!',
182184
prompt: 'Think about this problem',
183185
})
186+
187+
// Last streaming chunk is a labeled divider
184188
})
185189

186190
it('should include correct agentId and agentType in streaming messages', async () => {

0 commit comments

Comments
 (0)