test: fix CI coverage + e2e for user/message coalescing
- tui.spec: exercise a goal-sourced injected context card (labels by source kind, not plugin name), closing the last uncovered branch in tui/src/index.ts that the CI coverage gate caught. - time-context.e2e / goal.e2e: filter injected context by source now that it is a user/message (plugin/goal source), and count goal continuation rounds by round>0 rather than event type.
This commit is contained in:
@@ -48,7 +48,8 @@ describe('time-context through a real headless cordis.yml', () => {
|
||||
expect(stderr).not.toContain('UNHANDLED')
|
||||
expect(events.filter(event => event.type === 'turn/end')).toHaveLength(2)
|
||||
|
||||
const contexts = events.filter(event => event.type === 'user/message')
|
||||
const contexts = events.filter(
|
||||
(event): event is SessionEvent<'user/message'> => event.type === 'user/message' && event.data.source.kind === 'plugin')
|
||||
const starts = events.filter(event => event.type === 'step/start')
|
||||
expect(contexts).toHaveLength(2)
|
||||
expect(starts).toHaveLength(2)
|
||||
|
||||
Reference in New Issue
Block a user