Skip to content

Commit 645fcd6

Browse files
committed
Ensure webdriver session is closed before exiting
1 parent 0325a9b commit 645fcd6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/selenium.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@
172172
browserStream.push(result.browser);
173173
});
174174

175-
resultStream.onEnd(function() {
176-
browser.quit();
175+
return resultStream.fold([], pushToArray).flatMap(function(value) {
176+
return Bacon.fromCallback(function(callback) {
177+
browser.quit(function() {
178+
callback(value);
179+
});
180+
});
177181
});
178-
179-
return resultStream.fold([], pushToArray);
180182
}
181183

182184
function createImages(data) {

0 commit comments

Comments
 (0)