☕️ Classic, reliable, trusted test framework for Node.js and the browser
Fix a number of assertions that weren't asserting anything
Mislav Marohnić29a679bf7fc6
diff --git a/test/acceptance/utils.js b/test/acceptance/utils.jsindex 8b861745..053e7ca1 100644--- a/test/acceptance/utils.js+++ b/test/acceptance/utils.js@@ -385,9 +385,9 @@ describe('lib/utils', function () {.should.containEql('/tmp/mocha-utils-link.js').and.containEql('/tmp/mocha-utils.js').and.have.lengthOf(2);- existsSync('/tmp/mocha-utils-link.js').should.be.true;+ existsSync('/tmp/mocha-utils-link.js').should.be.true();fs.renameSync('/tmp/mocha-utils.js', '/tmp/bob');- existsSync('/tmp/mocha-utils-link.js').should.be.false;+ existsSync('/tmp/mocha-utils-link.js').should.be.false();utils.lookupFiles('/tmp', ['js'], false).should.eql([]);});diff --git a/test/grep.js b/test/grep.jsindex 633aab4e..ff9d25a1 100644--- a/test/grep.js+++ b/test/grep.js@@ -42,7 +42,7 @@ describe('Mocha', function(){describe('"invert" option', function(){it('should add a Boolean to the mocha.options object', function(){var mocha = new Mocha({ invert: true });- mocha.options.invert.should.be.ok;+ mocha.options.invert.should.be.ok();})})})diff --git a/test/runnable.js b/test/runnable.jsindex 6323cfa7..af34d064 100644--- a/test/runnable.js+++ b/test/runnable.js@@ -67,7 +67,7 @@ describe('Runnable(title, fn)', function(){it('should be .async', function(){var run = new Runnable('foo', function(done){});run.async.should.equal(1);- run.sync.should.be.false;+ run.sync.should.be.false();})})@@ -75,7 +75,7 @@ describe('Runnable(title, fn)', function(){it('should be .sync', function(){var run = new Runnable('foo', function(){});run.async.should.be.equal(0);- run.sync.should.be.true;+ run.sync.should.be.true();})})@@ -83,7 +83,7 @@ describe('Runnable(title, fn)', function(){it('should allow for whitelisting globals', function(done){var test = new Runnable('foo', function(){});test.async.should.be.equal(0);- test.sync.should.be.true;+ test.sync.should.be.true();test.globals(['foobar']);test.run(done);})@@ -327,7 +327,7 @@ describe('Runnable(title, fn)', function(){});test.timeout(10);test.run(function(err){- err.should.be.ok;+ err.should.be.ok();callCount.should.equal(1);done();});@@ -427,7 +427,7 @@ describe('Runnable(title, fn)', function(){test.timeout(10);test.run(function(err){- err.should.be.ok;+ err.should.be.ok();done();});})diff --git a/test/runner.js b/test/runner.jsindex cbf6b49f..7673a838 100644--- a/test/runner.js+++ b/test/runner.js@@ -114,7 +114,7 @@ describe('Runner', function(){it ('should not fail when a new common global is introduced', function(){// verify that the prop isn't enumerabledelete global.XMLHttpRequest;- global.propertyIsEnumerable('XMLHttpRequest').should.not.be.ok;+ global.propertyIsEnumerable('XMLHttpRequest').should.not.be.ok();// create a new runner and keep a reference to the test.var test = new Test('im a test about bears');@@ -123,7 +123,7 @@ describe('Runner', function(){// make the prop enumerable again.global.XMLHttpRequest = function() {};- global.propertyIsEnumerable('XMLHttpRequest').should.be.ok;+ global.propertyIsEnumerable('XMLHttpRequest').should.be.ok();// verify the test hasn't failed.newRunner.checkGlobals(test);diff --git a/test/suite.js b/test/suite.jsindex 011b3fb2..ac074c8d 100644--- a/test/suite.js+++ b/test/suite.js@@ -31,31 +31,31 @@ describe('Suite', function(){});it('should copy the bail value', function(){- this.suite.clone().bail().should.be.true;+ this.suite.clone().bail().should.be.true();});it('should not copy the values from the suites array', function(){- this.suite.clone().suites.should.be.empty;+ this.suite.clone().suites.should.be.empty();});it('should not copy the values from the tests array', function(){- this.suite.clone().tests.should.be.empty;+ this.suite.clone().tests.should.be.empty();});it('should not copy the values from the _beforeEach array', function(){- this.suite.clone()._beforeEach.should.be.empty;+ this.suite.clone()._beforeEach.should.be.empty();});it('should not copy the values from the _beforeAll array', function(){- this.suite.clone()._beforeAll.should.be.empty;+ this.suite.clone()._beforeAll.should.be.empty();});it('should not copy the values from the _afterEach array', function(){- this.suite.clone()._afterEach.should.be.empty;+ this.suite.clone()._afterEach.should.be.empty();});it('should not copy the values from the _afterAll array', function(){- this.suite.clone()._afterAll.should.be.empty;+ this.suite.clone()._afterAll.should.be.empty();});});@@ -112,14 +112,14 @@ describe('Suite', function(){describe('when no argument is passed', function(){it('should return the bail value', function(){- this.suite.bail().should.be.true;+ this.suite.bail().should.be.true();});});describe('when argument is passed', function(){it('should return the Suite object', function(){var newSuite = this.suite.bail(false);- newSuite.bail().should.be.false;+ newSuite.bail().should.be.false();});});});diff --git a/test/test.js b/test/test.jsindex 65b27fb8..1fcfea59 100644--- a/test/test.js+++ b/test/test.js@@ -29,7 +29,7 @@ describe('Test', function(){});it('should copy the enableTimeouts value', function(){- this._test.clone().enableTimeouts().should.be.true;+ this._test.clone().enableTimeouts().should.be.true();});it('should copy the retries value', function(){@@ -41,7 +41,7 @@ describe('Test', function(){});it('should copy the globals value', function(){- this._test.clone().globals().should.not.be.empty;+ this._test.clone().globals().should.not.be.empty();});it('should copy the parent value', function(){