#6214·mocha

️ Repo: Understand why `nyc bin/mocha.js` sometimes gives different behavior than `node bin/mocha.js`

Author: mark-wiemerCreated Aug 9, 2026Updated Sep 19, 2026
Labelsstatus: needs reviewarea: repository tooling

Tooling Suggestion Checklist

Overview

Some tests are still failing because the nyc cmd primes Node in a way that the mocha cmd doesn't. It's still unclear exactly why this was happening. In the v11.x branch, we successfully added "bare" tests that run directly via node bin/mocha.js to resolve the issue. Ref #5494 and #6156 for context and https://github.com/mochajs/mocha/pull/5498/changes#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 for the bare test infra.