Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Add test for ignoreLeaks and fix descriptions

Sebastian Van Sande1b1377c4048e
diff --git a/test/unit/mocha.spec.js b/test/unit/mocha.spec.js
index 2de2fc47..befb9302 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);