From 53e7cc95ce30305aeaf40d2942553cf33b64e3f1 Mon Sep 17 00:00:00 2001 From: Prince Bhardwaj <81508677+p21nc3@users.noreply.github.com> Date: Thu, 14 Dec 2023 02:05:00 +0000 Subject: [PATCH] ADD xml err func --- lib/reporters/junit/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/reporters/junit/index.js b/lib/reporters/junit/index.js index dc090a35d..3fe609864 100644 --- a/lib/reporters/junit/index.js +++ b/lib/reporters/junit/index.js @@ -13,6 +13,14 @@ var _ = require('lodash'), * @returns {*} */ JunitReporter = function (newman, reporterOptions) { + /** + * Convert the response entries to JSON format. + * @param {Array} errors + * @returns {Array} + */ + function xml(errors) { + return errors.map(error => JSON.stringify(error)); + } newman.on('beforeDone', function () { var report = _.get(newman, 'summary.run.executions'), collection = _.get(newman, 'summary.collection'),