Fix coding style in test/unit/testreporter.js
This commit is contained in:
parent
9e3f7e4d6d
commit
2bd81786c2
@ -13,8 +13,9 @@ var TestReporter = function(browser, appPath) {
|
|||||||
r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
|
r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
|
||||||
if (r.readyState == 4) {
|
if (r.readyState == 4) {
|
||||||
// Retry until successful
|
// Retry until successful
|
||||||
if (r.status !== 200)
|
if (r.status !== 200) {
|
||||||
send(action, json);
|
send(action, json);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
json['browser'] = browser;
|
json['browser'] = browser;
|
||||||
@ -30,8 +31,9 @@ var TestReporter = function(browser, appPath) {
|
|||||||
status: status,
|
status: status,
|
||||||
description: description
|
description: description
|
||||||
};
|
};
|
||||||
if (typeof error !== 'undefined')
|
if (typeof error !== 'undefined') {
|
||||||
message['error'] = error;
|
message['error'] = error;
|
||||||
|
}
|
||||||
send('/submit_task_results', message);
|
send('/submit_task_results', message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,9 +61,11 @@ var TestReporter = function(browser, appPath) {
|
|||||||
} else {
|
} else {
|
||||||
var failedMessages = '';
|
var failedMessages = '';
|
||||||
var items = results.getItems();
|
var items = results.getItems();
|
||||||
for (var i = 0, ii = items.length; i < ii; i++)
|
for (var i = 0, ii = items.length; i < ii; i++) {
|
||||||
if (!items[i].passed())
|
if (!items[i].passed()) {
|
||||||
failedMessages += items[i].message + ' ';
|
failedMessages += items[i].message + ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
sendResult('TEST-UNEXPECTED-FAIL', results.description, failedMessages);
|
sendResult('TEST-UNEXPECTED-FAIL', results.description, failedMessages);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user