Skip to content

Commit

Permalink
Ensure webdriver session is closed before exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Sep 9, 2014
1 parent 0325a9b commit 645fcd6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/selenium.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 645fcd6

Please sign in to comment.