Skip to content

Commit

Permalink
Merge pull request #789 from silvenon/sessionid
Browse files Browse the repository at this point in the history
Expose sessionId and capabilities to the after() hook
  • Loading branch information
christian-bromann committed Oct 13, 2015
2 parents 2924c57 + 9cbec82 commit 200a134
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ process.on('message', function(m) {
return global.browser.end();
}).then(function(res) {
if(!config.updateJob || config.host.indexOf('saucelabs') === -1 || !res || !res.sessionId) {
return;
return res.sessionId;
}

/**
Expand All @@ -185,14 +185,14 @@ process.on('message', function(m) {
'custom-data': capabilities['custom-data']
}
});
}).finally(function() {
}).then(function(sessionId) {
process.send({
event: 'runner:end',
failures: failures,
pid: process.pid
});

return q(config.after(failures, process.pid));
return q(config.after(failures, sessionId, capabilities));
}).finally(function() {
process.exit(failures === 0 ? 0 : 1);
});
Expand Down

0 comments on commit 200a134

Please sign in to comment.