Commit aae1eed
Fix flaky 'micro formats years' test
The test used setFullYear to go back exactly 10 years, but the 30-day
month approximation in elapsedTime drifts over long durations (3653
days / 30 = 121 months instead of 120), causing roundToSingleUnit to
overshoot and display "11y" instead of "10y".
Use a fixed day offset (2 * 365 days) instead, matching the pattern
of the existing tense=future micro years test which already has a
FIXME for this underlying bug.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b37f7ff commit aae1eed
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
527 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
528 | 529 | | |
529 | 530 | | |
530 | | - | |
| 531 | + | |
531 | 532 | | |
532 | 533 | | |
533 | | - | |
| 534 | + | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
| |||
0 commit comments