~caneypuggies/reformedchurcheslocator/couchapp-backbone

« back to all changes in this revision

Viewing changes to _attachments/js/vendor/requirejs/tests/doh/_nodeRunner.js

  • Committer: Tim Black
  • Date: 2013-09-16 22:50:16 UTC
  • Revision ID: tim@alwaysreformed.com-20130916225016-zk8jiba25z33ew7h
Versioned Bower vendor directory

Show diffs side-by-side

added added

removed removed

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