Ensure webdriver session is closed before exiting

This commit is contained in:
Niklas von Hertzen 2014-09-09 19:54:13 +03:00
parent 0325a9b836
commit 645fcd60b3

View File

@ -172,11 +172,13 @@
browserStream.push(result.browser);
});
resultStream.onEnd(function() {
browser.quit();
return resultStream.fold([], pushToArray).flatMap(function(value) {
return Bacon.fromCallback(function(callback) {
browser.quit(function() {
callback(value);
});
});
});
return resultStream.fold([], pushToArray);
}
function createImages(data) {