Skip to content

Commit

Permalink
Drop support for misspelled option suiteTitleSeparatedBy
Browse files Browse the repository at this point in the history
  • Loading branch information
clayreimann committed Jun 7, 2020
1 parent fababe6 commit 3d1909d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -187,7 +187,6 @@ output line 2
| toConsole | `false` | if set to a truthy value the produced XML will be logged to the console |
| useFullSuiteTitle | `false` | if set to a truthy value nested suites' titles will show the suite lineage |
| suiteTitleSeparatedBy | ` ` (space) | the character to use to separate nested suite titles. (defaults to ' ', '.' if in jenkins mode) |
| suiteTitleSeparedBy | ` ` (space) | deprecated. use `suiteTitleSeparatedBy` |
| testCaseSwitchClassnameAndName | `false` | set to a truthy value to switch name and classname values |
| rootSuiteTitle | `Root Suite` | the name for the root suite. (defaults to 'Root Suite') |
| testsuitesTitle | `Mocha Tests` | the name for the `testsuites` tag (defaults to 'Mocha Tests') |
Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -76,7 +76,7 @@ function configureDefaults(options) {
updateOptionsForJenkinsMode(config);
}

config.suiteTitleSeparatedBy = config.suiteTitleSeparatedBy || config.suiteTitleSeparedBy || ' ';
config.suiteTitleSeparatedBy = config.suiteTitleSeparatedBy || ' ';

return config;
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "mocha-junit-reporter",
"version": "1.23.3",
"version": "2.0.0",
"description": "A JUnit reporter for mocha.",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 0 additions & 10 deletions test/mocha-junit-reporter-spec.js
Expand Up @@ -343,16 +343,6 @@ describe('mocha-junit-reporter', function() {
});
});

it('respects the misspelled "suiteTitleSeparatedBy" option', function(done) {
var reporter = createReporter({useFullSuiteTitle: true, suiteTitleSeparedBy: '.'});
executeTestRunner(reporter.runner, function() {
expect(suiteName(reporter._testsuites[0])).to.equal('');
expect(suiteName(reporter._testsuites[1])).to.equal('Root Suite.Foo Bar');
expect(suiteName(reporter._testsuites[2])).to.equal('Root Suite.Another suite!');
done();
});
});

function suiteName(suite) {
return suite.testsuite[0]._attr.name;
}
Expand Down

0 comments on commit 3d1909d

Please sign in to comment.