Repository navigation
Commit d03f84d
test(signals): tolerate sub-ms timer skew in attribution wall-clock assertions
`await wait(N)` then `expect(x.settledMs).toBeGreaterThanOrEqual(N)` flaked
in CI (29.92 vs 30, 9.80 vs 10): libuv timers are ms-granular, so a
setTimeout(N) can fire a hair under N ms of `performance.now()`, the clock
the attribution engine stamps with. `wait` in the three affected files now
resolves with the time actually waited on that clock, and the eight exact-N
assertions compare against it — a strict lower bound on the engine's own
interval, no fudge. Assertions that already carried slack are untouched.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>1 parent 27bb3fa commit d03f84d
3 files changed
Lines changed: 37 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
119 | | - | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
141 | 149 | | |
142 | 150 | | |
143 | 151 | | |
144 | | - | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
| |||
578 | 586 | | |
579 | 587 | | |
580 | 588 | | |
581 | | - | |
| 589 | + | |
582 | 590 | | |
583 | 591 | | |
584 | 592 | | |
585 | 593 | | |
586 | | - | |
| 594 | + | |
587 | 595 | | |
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
591 | 599 | | |
592 | 600 | | |
593 | | - | |
594 | | - | |
| 601 | + | |
| 602 | + | |
595 | 603 | | |
596 | 604 | | |
597 | 605 | | |
| |||
652 | 660 | | |
653 | 661 | | |
654 | 662 | | |
655 | | - | |
| 663 | + | |
656 | 664 | | |
657 | 665 | | |
658 | 666 | | |
659 | | - | |
| 667 | + | |
660 | 668 | | |
661 | 669 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
202 | | - | |
| 206 | + | |
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
285 | | - | |
| 289 | + | |
286 | 290 | | |
287 | 291 | | |
288 | 292 | | |
| |||
390 | 394 | | |
391 | 395 | | |
392 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
393 | 400 | | |
| 401 | + | |
394 | 402 | | |
395 | 403 | | |
396 | 404 | | |
| |||
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
408 | | - | |
| 416 | + | |
409 | 417 | | |
410 | 418 | | |
411 | 419 | | |
| |||
478 | 486 | | |
479 | 487 | | |
480 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
481 | 492 | | |
482 | 493 | | |
483 | 494 | | |
| |||
488 | 499 | | |
489 | 500 | | |
490 | 501 | | |
| 502 | + | |
491 | 503 | | |
492 | 504 | | |
493 | 505 | | |
| |||
508 | 520 | | |
509 | 521 | | |
510 | 522 | | |
511 | | - | |
| 523 | + | |
512 | 524 | | |
513 | 525 | | |
514 | 526 | | |
| |||
0 commit comments