When you run npm test and it fails, you get the test outputs + a single error message, like so:
npm test
npm ERR! Test failed. See above for more details. <
Use the npm run --silent option:
--silent
$ npm run --silent test
Even less typing if you define a shell alias:
$ alias run='npm run --silent' $ run test