X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fphantom%2Frun-jasmine.js;h=b3702d4e2786c3a5c3dbec26f7c6fa4f24674dd5;hb=5a126c522666307f9dffd7835c70fe1889d276cc;hp=396417b48dd408276df4fd8c073a8f1087e8f92f;hpb=407cc2adeb15d0323182c00d092b2b755a02d8bf;p=mkws-moved-to-github.git diff --git a/test/phantom/run-jasmine.js b/test/phantom/run-jasmine.js index 396417b..b3702d4 100644 --- a/test/phantom/run-jasmine.js +++ b/test/phantom/run-jasmine.js @@ -46,7 +46,13 @@ function wait_for_jasmine(checkFx, readyFx, failFx, timeout) { clearInterval(interval); result.time = (new Date().getTime() - start); result.failed ? failFx(result) : readyFx(result); - phantom.exit(result.failed == 0 ? 0 : 2); + + // See: https://github.com/ariya/phantomjs/issues/12697 + // phantomjs 1.9.8 + page.close(); + setTimeout(function () { + phantom.exit(result.failed == 0 ? 0 : 2); + }, 0); } // timeout @@ -136,7 +142,7 @@ page.open(url, function (status) { html: $("html").html(), duration: $(".duration").text(), error_msg: error_msg, - failed: list.length, + failed: (list.length > 0 || !passing), passing: passing }; })