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 bf6ff56 commit 6541784
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/unit/mocha.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,28 @@ describe('Mocha', function() {
);
});

it('should set the reporterOptions.highlight to false', function() {
var mocha = new Mocha(opts);
mocha.noHighlighting(true);
expect(
mocha.options.reporterOptions,
'to have property',
'highlight',
false
);
});

it('should set the reporterOptions.highlight to true', function() {
var mocha = new Mocha(opts);
mocha.noHighlighting(false);
expect(
mocha.options.reporterOptions,
'to have property',
'highlight',
true
);
});

it('should be chainable', function() {
var mocha = new Mocha(opts);
expect(mocha.noHighlighting(), 'to be', mocha);
Expand Down

0 comments on commit 6541784

Please sign in to comment.