File: _nodeRunner.js

package info (click to toggle)
node-amdefine 1.0.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 616 kB
  • sloc: javascript: 7,139; makefile: 2; sh: 1
file content (20 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

/*global doh: false, process: false */

var aps = Array.prototype.slice;

doh.debug = function () {
    //Could have multiple args, join them all together.
    var msg = aps.call(arguments, 0).join(' ');
    console.log(msg);
};

// Override the doh._report method to make it quit with an
// appropriate exit code in case of test failures.
var oldReport = doh._report;
doh._report = function () {
    oldReport.apply(doh, arguments);
    if (this._failureCount > 0 || this._errorCount > 0) {
        process.exit(1);
    }
};