Permalink
Browse files

return status code

  • Loading branch information...
1 parent a083880 commit eb4a8ca7a743cd7e3256846138ce932b16c520e3 @Trott committed Mar 8, 2014
Showing with 4 additions and 3 deletions.
  1. +4 −3 tests/jasmine/run-jasmine.js
@@ -6,7 +6,7 @@ if (system.args.length !== 2) {
}
// Check for console message indicating jasmine is finished running
-var doneRegEx = /^Finished in \d+ second/;
+var doneRegEx = /^\d+ specs, (\d+) failure/;
var page = require('webpage').create();
@@ -15,8 +15,9 @@ var page = require('webpage').create();
page.onConsoleMessage = function (msg) {
system.stdout.write(msg);
- if (msg.match(doneRegEx)) {
- phantom.exit();
+ var match = doneRegEx.exec(msg);
+ if (match) {
+ phantom.exit(match[1]);
}
};

0 comments on commit eb4a8ca

Please sign in to comment.