()
| 152 | } |
| 153 | |
| 154 | getResult(): KeyedTestResult<K, V> { |
| 155 | const materializedResults = materializeKeyedResults(this.messages) |
| 156 | const sortedResults = Array.from(materializedResults.entries()).sort( |
| 157 | (a, b) => { |
| 158 | // Sort by key for consistent ordering |
| 159 | return JSON.stringify(a[0]).localeCompare(JSON.stringify(b[0])) |
| 160 | }, |
| 161 | ) |
| 162 | |
| 163 | return { |
| 164 | messages: this.messages, |
| 165 | messageCount: this.messages.length, |
| 166 | materializedResults, |
| 167 | sortedResults, |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | reset() { |
| 172 | this.messages = [] |