From 1b1377c4048e0b6de93a0b9b7aa9d568c7ef6fba Mon Sep 17 00:00:00 2001 From: Sebastian Van Sande Date: Thu, 15 Jun 2017 15:12:21 +0200 Subject: [PATCH] Add test for ignoreLeaks and fix descriptions --- test/unit/mocha.spec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/unit/mocha.spec.js b/test/unit/mocha.spec.js index 2de2fc4768..befb9302d4 100644 --- a/test/unit/mocha.spec.js +++ b/test/unit/mocha.spec.js @@ -62,12 +62,18 @@ describe('Mocha', function () { mocha.options.ignoreLeaks.should.equal(true); }); - it('should set the ignoreLeaks option to true when param equals false', function () { + it('should set the ignoreLeaks option to false when param equals false', function () { var mocha = new Mocha(blankOpts); mocha.ignoreLeaks(false); mocha.options.ignoreLeaks.should.equal(false); }); + it('should set the ignoreLeaks option to false when the param is undefined', function () { + var mocha = new Mocha(blankOpts); + mocha.ignoreLeaks(); + mocha.options.ignoreLeaks.should.equal(false); + }); + it('should be chainable', function () { var mocha = new Mocha(blankOpts); mocha.ignoreLeaks(false).should.equal(mocha); @@ -120,7 +126,7 @@ describe('Mocha', function () { mocha.options.useInlineDiffs.should.equal(true); }); - it('should set the useInlineDiffs option to true when param equals false', function () { + it('should set the useInlineDiffs option to false when param equals false', function () { var mocha = new Mocha(blankOpts); mocha.useInlineDiffs(false); mocha.options.useInlineDiffs.should.equal(false);