Skip to content

Commit

Permalink
fix coverage in noHighlighting function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-jeong committed Oct 15, 2019
1 parent c21a5a3 commit 4d3d444
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ Mocha.prototype.noHighlighting = function(enableHighlight) {
utils.deprecate(
'noHighlighting is deprecated; provide {reporterOption: {highlight: false}} to mocha.setup().'
);
enableHighlight = enableHighlight === undefined ? true : enableHighlight;
this.options.reporterOptions = this.options.reporterOptions || {};
this.options.reporterOptions.highlight =
enableHighlight !== undefined && enableHighlight !== true;
this.options.reporterOptions.highlight = enableHighlight !== true;
return this;
};

Expand Down

0 comments on commit 4d3d444

Please sign in to comment.