At version 4.0.0, Mocha changed the default behavior from exiting after tests were complete to not exiting. From that point on, you must add the --exit flag if you want mocha to stop when tests have been run.
1607
Given you're running Node.js version >=v18
and you've run npm install
When you run npm test
Then the tests execute but fails to exit the process
At version 4.0.0, Mocha changed the default behavior from exiting after tests were complete to not exiting. From that point on, you must add the --exit flag if you want mocha to stop when tests have been run.
1607
Given you're running Node.js version >=v18 and you've run
npm install
When you runnpm test
Then the tests execute but fails to exit the process