Writing Unit Tests (running on Jenkins with mocha), i override errored function to throw Error instead logging error in console.
But now Report function throw an error: "Total of 0 structure validation error(s)", that is definitely not an error.
I suggest to manage error and logs with options object, so anyone can handle errors and logs by his own (as fallback errored implementation will remain the same) like onWarning property of "options".
Expected behaviour
Errored function is called when an error occurs.
Actual behaviour
Writing Unit Tests (running on Jenkins with mocha), i override errored function to throw Error instead logging error in console.
But now Report function throw an error: "Total of 0 structure validation error(s)", that is definitely not an error.
I suggest to manage error and logs with options object, so anyone can handle errors and logs by his own (as fallback errored implementation will remain the same) like onWarning property of "options".
This is a simple test set to reproduce issue
I will submit a PR as soon as possible if this idea can be interesting.
Versions and environment
Thank you and have some :grapes:.