Commit e18a1dc
authored
🤖 fix: de-flake integration tests (sendMessageAndWait timeout + resumeStream) (#741)
Two fixes for flaky integration tests:
**1. sendMessageAndWait timeout handling**
When `sendMessageAndWait` times out waiting for `stream-end`, it now
throws an error with diagnostics instead of silently returning partial
events.
- Before: Confusing failures like
`expect(createStreamEnd).toBeDefined()`
- After: Clear error: `Timeout waiting for stream-end after 15000ms`
with event diagnostics
**2. resumeStream test fix**
Fixed incorrect assumption that `StreamEndEvent` has a `content`
field—it has a `parts` array of `MuxTextPart | MuxReasoningPart |
MuxToolPart`. Now correctly extracts text from the parts.
---
_Generated with `mux`_1 parent ed754d8 commit e18a1dc
2 files changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
203 | 199 | | |
204 | 200 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
214 | | - | |
| 213 | + | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
| |||
0 commit comments