From aa9214cb041e89a3967e54261d2820467ce24a17 Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Tue, 18 Sep 2018 16:06:21 +0530 Subject: [PATCH] [reporter] minor workaround for xml escaping --- src/lib/assertionsLibrary.js | 2 +- src/reporters/xunit.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/assertionsLibrary.js b/src/lib/assertionsLibrary.js index d9fe8f7..e51daef 100644 --- a/src/lib/assertionsLibrary.js +++ b/src/lib/assertionsLibrary.js @@ -65,7 +65,7 @@ module.exports.hasProp = module.exports.hasPair = [ (val, ...pair) => isEq(val[pair[0]], pair[1]), - (val, ...pair) => _`<${pair}> does not exist in ${val}`, + (val, ...pair) => _`${pair} does not exist in ${val}`, ]; module.exports.isPromise = [ diff --git a/src/reporters/xunit.js b/src/reporters/xunit.js index 322e753..4d58369 100644 --- a/src/reporters/xunit.js +++ b/src/reporters/xunit.js @@ -11,7 +11,6 @@ const tag = (name, attrs, close, content) => { tag = "<" + name + (pairs.length ? " " + pairs.join(" ") : "") + end; if (content) { - // content = content instanceof String ? content : escape(content); tag += content + " { tag( 'testsuite', { + name: results.name, tests: count, success: success.length, failures: failures.length, @@ -41,10 +41,10 @@ const convert = results => { ? tag('skipped', {}, true) : tag( 'failure', {}, - !r.reason, r.reason ? escape(r.reason) : '')); + !r.reason, r.reason ? r.reason : '')); acc += tag( 'testcase', - { name: escape(r.description) }, + { name: r.description }, close, content || '' );