Can you please try "scripts": { "test": "mocha" } in package.json file and then run the only command as
"scripts": { "test": "mocha" }
'npm test'