Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(browserstack): mark test suite as failed/passed on BrowserStack (#…
Browse files Browse the repository at this point in the history
…3409)

closes #3256
  • Loading branch information
vedharish authored and cnishina committed Jul 25, 2016
1 parent 71532f0 commit 828e80c
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions lib/driverProviders/browserStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,21 @@ export class BrowserStack extends DriverProvider {
});
let jobStatus = update.passed ? 'completed' : 'error';
options.method = 'PUT';
https
.request(
options,
(res) => {
let responseStr = '';
res.on('data', (data: Buffer) => {
responseStr += data.toString();
});
res.on('end', () => {
logger.info(responseStr);
deferred.resolve();
});
res.on('error', (e: Error) => {
throw new BrowserError(
logger,
'Error updating BrowserStack pass/fail status: ' +
util.inspect(e));
});
})
.write('{\'status\': ' + jobStatus + '}');
let update_req = https.request(options, (res) => {
let responseStr = '';
res.on('data', (data: Buffer) => { responseStr += data.toString(); });
res.on('end', () => {
logger.info(responseStr);
deferred.resolve();
});
res.on('error', (e: Error) => {
throw new BrowserError(
logger, 'Error updating BrowserStack pass/fail status: ' +
util.inspect(e));
});
});
update_req.write('{"status":"' + jobStatus + '"}');
update_req.end();
});
return deferred.promise;
});
Expand Down

0 comments on commit 828e80c

Please sign in to comment.