Criei a váriavel de ambiente NODE_ENV e dei o valor de "development", meu package.json ficou assim.
{
"name": "casadocodigo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "set NODE_ENV=test node node_modules/mocha/bin/mocha",
"test": "mocha"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.2",
"ejs": "^2.6.1",
"express": "^4.16.3",
"express-load": "^1.1.16",
"express-validator": "^5.2.0",
"mysql": "^2.15.0"
},
"devDependencies": {
"mocha": "^2.3.3",
"supertest": "^1.1.0"
}
}
E mesmo assim continua a dar erro :/