Failures cause app to exit with exitStatus != 1

This commit is contained in:
Corey Johnson
2012-03-14 11:00:35 -07:00
parent 117d9287e0
commit 56fb238bf6
2 changed files with 5 additions and 2 deletions

View File

@@ -254,7 +254,10 @@ bool NativeHandler::Execute(const CefString& name,
return true;
}
else if (name == "exit") {
[NSApp terminate:NSApp];
int exitStatus = 0;
if (arguments.size() > 0) exitStatus = arguments[0]->GetIntValue();
exit(exitStatus);
return true;
}

View File

@@ -104,7 +104,7 @@ jasmine.AtomReporter.prototype.reportRunnerResults = function(runner) {
this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
if (atom.exitAfterSpecs) $native.exit()
if (atom.exitAfterSpecs) $native.exit(results.failedCount > 0 ? 1 : 0)
};
jasmine.AtomReporter.prototype.reportSuiteResults = function(suite) {