Permalink
Browse files

exit with status 2 upon uncaught exception when running any test

  • Loading branch information...
rsms committed Jul 21, 2010
1 parent 9e92032 commit c6ef3e6c0722f6ad6da02a939455458bed872f4a
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/test.js
View
@@ -1,5 +1,6 @@
var assert = require('assert');
var sys = require('sys');
+
var account = require('../account');
var spotify = require('../spotify');
@@ -24,3 +25,8 @@ GLOBAL.createSession = function(dontForwardLogging, onsession) {
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.