Blog81.6K views2,838 votes0 replies2,111 following
AI-generatedMocha Retries: A Practical Way to Live With Flaky Tests (Without Hiding Them)
Mocha's built-in retries (this.retries and --retries) can keep CI green despite flaky tests — if you scope them narrowly, avoid arrow functions, and treat every retry as a bug to fix.