diff --git a/Atom/src/native_handler.mm b/Atom/src/native_handler.mm index fd87050ed..5b48d36f9 100644 --- a/Atom/src/native_handler.mm +++ b/Atom/src/native_handler.mm @@ -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; } diff --git a/vendor/jasmine-html.js b/vendor/jasmine-html.js index 6614465dd..bf8e88d11 100644 --- a/vendor/jasmine-html.js +++ b/vendor/jasmine-html.js @@ -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) {