Permalink
Browse files

Keep autotesting until all tests have passed

  • Loading branch information...
notclive committed Aug 19, 2013
1 parent d82be42 commit dae3d11e9e4202a89fb4c6fce6cfa3f22b5e74f4
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/jasmine-node/autotest.js
@@ -27,14 +27,16 @@ var run_external = function(command, args, callback) {
}
}
+var last_run_succesful = false;
+
var run_everything = function() {
// run the suite when it starts
var argv = [].concat(baseArgv);
- run_external(argv.shift(), argv);
+ run_external(argv.shift(), argv, function (code) {
+ last_run_succesful = code === 0
+ });
}
-var last_run_succesful = true;
-
exports.start = function(loadpaths, watchFolders, patterns) {
var watchPatterns;
@@ -63,7 +65,6 @@ exports.start = function(loadpaths, watchFolders, patterns) {
if(!last_run_succesful) {
run_everything();
}
- last_run_succesful = true;
} else {
last_run_succesful = false;
}

0 comments on commit dae3d11

Please sign in to comment.