Mocha v4 Exit Policy Transition: Default Drain vs --exit
Mocha v4 changed the default behavior to allow the event loop to drain after test execution instead of forcibly terminating the process. Because a test run that remains alive can be caused by open timers, servers, sockets, or other handles, it is unclear whether the lingering process indicates a memory leak, a resource‑ownership issue, or intentional lifetim