Marked as helpful by the asker
Tell it what a test must observe, not what it must not mock:
Render a component that uses
useCountdown(3). Advance fake timers by 3 seconds. Assert the rendered text goes from 3 to 0 andonDonewas called once.
With Testing Library and vi.useFakeTimers() that's a real test. The mock of setInterval is fine, that's the environment; the hook itself must run for real.