mercredi 21 octobre 2020

Nodemon ignore failing command

I am using nodemon to watch some test scripts in my package.json file.

"test:watch": "nodemon --exec npm run test --watch src/ --watch test/ --ext .ts",

It works nicely, but when the tests fail, it outputs

[nodemon] app crashed - waiting for file changes before starting...

The app obviously did not crash, jest just returned failure code. It is a cosmetic issue, since the watch continues to work, but it would still be nice to either ignore the returned failure code or at least change the error message returned to reduce confusion for junior members.

Is this possible?

Here is the successful running of a test suite

[nodemon] clean exit - waiting for changes before restart

Aucun commentaire:

Enregistrer un commentaire