With jitter (Math.random()*4000), advancing timers by exactly 5000ms no longer guaranteed to trigger the reconnect. Mocking Math.random to 0 in beforeEach makes the delay deterministic (base only, no jitter) across the full test suite. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>