Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9 from smccarthy/master
Browse files Browse the repository at this point in the history
Add configurable suite name
  • Loading branch information
archlichking authored Dec 7, 2017
2 parents 00c3061 + e3e89b4 commit c14f1bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const START_TIME = (new Date()).toISOString();

const settings = {
verbose: false,
path: process.env.XUNIT_REPORT_PATH || "./mocha_report.xml"
path: process.env.XUNIT_REPORT_PATH || "./mocha_report.xml",
suiteName: process.env.XUNIT_SUITE_NAME || "Mocha Tests"
};

class Reporter {
Expand Down Expand Up @@ -136,7 +137,7 @@ class Reporter {
_writeXmlReport(data) {
const jsonReport = {
testsuite: {
name: "Mocha Tests",
name: this.opts.settings.suiteName,
tests: data.stats.tests,
failures: data.stats.failures,
errors: data.stats.failures,
Expand Down

0 comments on commit c14f1bc

Please sign in to comment.