samedi 6 février 2016

Mocha throws an error when no tests are found. Can this be suppressed?

I'm running Mocha on the command line like this:

mocha --recursive "./src/**/*.spec.js"

This works great. However, if no test files are found, it throws this error:

cannot resolve path (or pattern) './src/**/*.spec.js'

Is there a way to suppress this error message when no tests exist?

(To clarify, this is relevant because it's part of my React Slingshot starter kit, so no tests will exist after they delete my example tests to begin their project).

Aucun commentaire:

Enregistrer un commentaire