Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Keep autotesting until all tests have passed

  • Loading branch information...
commit dae3d11e9e4202a89fb4c6fce6cfa3f22b5e74f4 1 parent d82be42
@notclive notclive authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/jasmine-node/autotest.js
View
9 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.