Skip to main content
Manusで任意のスキルを実行
ワンクリックで

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

スター1
フォーク0
更新日2026年1月27日 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.

インストール

Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。

SKILL.md
readonly