In my case, while testing through Mocha, I tried everything just to understand that I need to remove single quotes around the test script tag in package.json .
I am running a mocha test, on all *.test.js files as can be seen below:
package.json
Before:
"scripts": { "test": "mocha server/**/*.test.js", "test-watch": "nodemon --exec 'npm run test'" }
After (removing single quotes - npm run test):
"scripts": { "test": "mocha server/**/*.test.js", "test-watch": "nodemon --exec npm run test" }
Worked for me, in case anyone else gets stuck on this.
Ylama Oct 08 '18 at 13:20 2018-10-08 13:20
source share