Get a summary of collected events for debugging
()
| 122 | |
| 123 | /** Get a summary of collected events for debugging */ |
| 124 | getSummary(): { |
| 125 | totalEvents: number |
| 126 | totalChunks: number |
| 127 | eventTypes: Record<string, number> |
| 128 | hasErrors: boolean |
| 129 | } { |
| 130 | const eventTypes: Record<string, number> = {} |
| 131 | for (const event of this.events) { |
| 132 | eventTypes[event.type] = (eventTypes[event.type] || 0) + 1 |
| 133 | } |
| 134 | return { |
| 135 | totalEvents: this.events.length, |
| 136 | totalChunks: this.streamChunks.length, |
| 137 | eventTypes, |
| 138 | hasErrors: this.errors.length > 0, |
| 139 | } |
| 140 | } |
| 141 | } |
no outgoing calls
no test coverage detected