Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

xunit reporter: don't include attrs in failure tag

Zsolt Takácsfd6f810c119b
diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js
index e956380d..3506a07b 100644
--- a/lib/reporters/xunit.js
+++ b/lib/reporters/xunit.js
@@ -83,8 +83,7 @@ function test(test) {
if ('failed' == test.state) {
var err = test.err;
- attrs.message = escape(err.message);
- console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack))));
+ console.log(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack))));
} else if (test.pending) {
console.log(tag('testcase', attrs, false, tag('skipped', {}, true)));
} else {