Skip to content

Commit

Permalink
exit with status 2 upon uncaught exception when running any test
Browse files Browse the repository at this point in the history
  • Loading branch information
rsms committed Jul 21, 2010
1 parent 9e92032 commit c6ef3e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.js
@@ -1,5 +1,6 @@
var assert = require('assert'); var assert = require('assert');
var sys = require('sys'); var sys = require('sys');

var account = require('../account'); var account = require('../account');
var spotify = require('../spotify'); var spotify = require('../spotify');


Expand All @@ -24,3 +25,8 @@ GLOBAL.createSession = function(dontForwardLogging, onsession) {
onsession(session); onsession(session);
}); });
} }

process.on('uncaughtException', function (err) {
console.error(err.stack || err);
process.exit(2);
});

0 comments on commit c6ef3e6

Please sign in to comment.