Skip to content Skip to sidebar Skip to footer

How To Prevent Mocha From Exiting Process With Status 1

I have written a simple node.js application and now I want to add some tests. For now I have only some example Tests to test my Gitlab-CI, SonarQube and Mocha, which i am using for

Solution 1:

Perhaps can you just do:

./node_modules/.bin/mocha || true

If it fails, it will then return true, and be successful.

Solution 2:

Add parameter silent to command line. For example:

npm run test --silent

Post a Comment for "How To Prevent Mocha From Exiting Process With Status 1"