From what I understand, the mocha test framework will throw this error if some error occurs in the before method:
> $(npm bin)/mocha test/*.j
It has been a little time since it was asked but for the future readers here we go:
You can run your test with mocha test/*.js --timeout 5000 command. That's it.
But if you run your test with npm test command, just edit your package.json file
like that:
"scripts": {
"start": "nodemon ./bin/www",
"test": "mocha --exit --recursive --timeout 5000" // add this line
}