test: stabilize thinking update assertion

This commit is contained in:
weishu
2026-04-29 09:15:01 +08:00
parent 04fbc0d37f
commit 71406ab08d
+4 -1
View File
@@ -108,7 +108,10 @@ describe('alive incremental events', () => {
expect(engine.getSession(session.id)?.activeAt).toBe(activeAtBeforeSend)
expect(emittedSocketUpdates.length).toBeGreaterThan(0)
const update = events.find((event) => event.type === 'session-updated')
const update = events.find((event) => (
event.type === 'session-updated'
&& (event.data as { thinking?: unknown }).thinking === true
))
expect(update).toBeDefined()
if (!update || update.type !== 'session-updated') {
return