Skip to content

Commit

Permalink
fix: Make disconnects fail the tests
Browse files Browse the repository at this point in the history
Closes #54
  • Loading branch information
dignifiedquire committed Oct 20, 2015
1 parent 6a15162 commit f7839fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/sauce_reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ var SauceReporter = function (logger, /* sauce:jobMapping */ jobMapping) {
// browser.launchId was used until v0.10.2, but changed to just browser.id in v0.11.0
var browserId = browser.launchId || browser.id

if (result.disconnected) {
log.error('✖ Test Disconnected')
}

if (result.error) {
log.error('✖ Test Errored')
}

if (browserId in jobMapping) {
var jobDetails = jobMapping[browserId]

var sauceApi = new SauceLabs(jobDetails.credentials)

// We record pass/fail status, as well as the full results in "custom-data".
var payload = {
passed: !(result.failed || result.error),
passed: !(result.failed || result.error || result.disconnected),
'custom-data': result
}

Expand Down

0 comments on commit f7839fc

Please sign in to comment.