Skip to main content
Exécutez n'importe quel Skill dans Manus
en un clic

vitest-retry-testing-real-vs-fake-timers

Étoiles1
Forks0
Mis à jour27 janvier 2026 à 08:46

Fix Vitest "PromiseRejectionHandledWarning" and flaky tests when testing retry logic with exponential backoff. Use when: (1) Testing setTimeout-based retry mechanisms with promises, (2) Getting unhandled promise rejection warnings with vi.useFakeTimers(), (3) Tests pass/fail inconsistently when using advanceTimersByTimeAsync, (4) Testing exponential backoff, rate limiting, or circuit breaker patterns. For simple retry logic with small delays (10-100ms), real timers often work better than fake timers due to microtask/macrotask coordination complexity.

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly