Merge pull request #77 from existentialism/junit-failure-output
Fixed missing junit failure output (#76)
This commit is contained in:
commit
63ccee9ef9
@ -236,10 +236,14 @@ phantom.sendMessage = function() {
|
|||||||
|
|
||||||
var testcases = map(suite.specs(), function(spec) {
|
var testcases = map(suite.specs(), function(spec) {
|
||||||
var failureMessages = [];
|
var failureMessages = [];
|
||||||
if (spec.results().failedCount) {
|
var specResults = spec.results();
|
||||||
|
var resultsItems = specResults.items_;
|
||||||
|
var resultsItemCount = resultsItems.length;
|
||||||
|
|
||||||
|
if (specResults.failedCount) {
|
||||||
failures++;
|
failures++;
|
||||||
var resultsItems = spec.results().items_;
|
|
||||||
for (var ii = 0; ii < resultsItems; ii++) {
|
for (var ii = 0; ii < resultsItemCount; ii++) {
|
||||||
var expectation = resultsItems[ii];
|
var expectation = resultsItems[ii];
|
||||||
if (!expectation.passed()) {
|
if (!expectation.passed()) {
|
||||||
failureMessages.push(expectation.message);
|
failureMessages.push(expectation.message);
|
||||||
@ -247,7 +251,7 @@ phantom.sendMessage = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
assertions: spec.results().items_.length,
|
assertions: resultsItemCount,
|
||||||
className: getNestedSuiteName(spec.suite),
|
className: getNestedSuiteName(spec.suite),
|
||||||
name: spec.description,
|
name: spec.description,
|
||||||
time: spec.duration / 1000,
|
time: spec.duration / 1000,
|
||||||
|
Loading…
Reference in New Issue
Block a user