|
@ -11,7 +11,6 @@ const tag = (name, attrs, close, content) => { |
|
|
|
|
|
|
|
|
tag = "<" + name + (pairs.length ? " " + pairs.join(" ") : "") + end; |
|
|
tag = "<" + name + (pairs.length ? " " + pairs.join(" ") : "") + end; |
|
|
if (content) { |
|
|
if (content) { |
|
|
// content = content instanceof String ? content : escape(content);
|
|
|
|
|
|
tag += content + "</" + name + end; |
|
|
tag += content + "</" + name + end; |
|
|
} |
|
|
} |
|
|
return new String(tag); |
|
|
return new String(tag); |
|
@ -28,6 +27,7 @@ const convert = results => { |
|
|
tag( |
|
|
tag( |
|
|
'testsuite', |
|
|
'testsuite', |
|
|
{ |
|
|
{ |
|
|
|
|
|
name: results.name, |
|
|
tests: count, |
|
|
tests: count, |
|
|
success: success.length, |
|
|
success: success.length, |
|
|
failures: failures.length, |
|
|
failures: failures.length, |
|
@ -41,10 +41,10 @@ const convert = results => { |
|
|
? tag('skipped', {}, true) |
|
|
? tag('skipped', {}, true) |
|
|
: tag( |
|
|
: tag( |
|
|
'failure', {}, |
|
|
'failure', {}, |
|
|
!r.reason, r.reason ? escape(r.reason) : '')); |
|
|
!r.reason, r.reason ? r.reason : '')); |
|
|
acc += tag( |
|
|
acc += tag( |
|
|
'testcase', |
|
|
'testcase', |
|
|
{ name: escape(r.description) }, |
|
|
{ name: r.description }, |
|
|
close, |
|
|
close, |
|
|
content || '' |
|
|
content || '' |
|
|
); |
|
|
); |
|
|