projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check whether there are any URLs before iterating over them.
[mkws-moved-to-github.git]
/
test
/
phantom
/
run-jasmine.js
diff --git
a/test/phantom/run-jasmine.js
b/test/phantom/run-jasmine.js
index
396417b
..
b3702d4
100644
(file)
--- 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);
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
}
// timeout
@@
-136,7
+142,7
@@
page.open(url, function (status) {
html: $("html").html(),
duration: $(".duration").text(),
error_msg: error_msg,
html: $("html").html(),
duration: $(".duration").text(),
error_msg: error_msg,
- failed: list.length,
+ failed: (list.length > 0 || !passing),
passing: passing
};
})
passing: passing
};
})