_nodeRunner.js 527 B

1234567891011121314151617181920
  1. /*global doh: false, process: false */
  2. var aps = Array.prototype.slice;
  3. doh.debug = function () {
  4. //Could have multiple args, join them all together.
  5. var msg = aps.call(arguments, 0).join(' ');
  6. console.log(msg);
  7. };
  8. // Override the doh._report method to make it quit with an
  9. // appropriate exit code in case of test failures.
  10. var oldReport = doh._report;
  11. doh._report = function () {
  12. oldReport.apply(doh, arguments);
  13. if (this._failureCount > 0 || this._errorCount > 0) {
  14. process.exit(1);
  15. }
  16. };