Skip to content

Commit 29a679b

Browse files
committed
Fix a number of assertions that weren't asserting anything
They were missing parentheses and thus no assertion method was ever executed.
1 parent cf513cb commit 29a679b

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

test/acceptance/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ describe('lib/utils', function () {
385385
.should.containEql('/tmp/mocha-utils-link.js')
386386
.and.containEql('/tmp/mocha-utils.js')
387387
.and.have.lengthOf(2);
388-
existsSync('/tmp/mocha-utils-link.js').should.be.true;
388+
existsSync('/tmp/mocha-utils-link.js').should.be.true();
389389
fs.renameSync('/tmp/mocha-utils.js', '/tmp/bob');
390-
existsSync('/tmp/mocha-utils-link.js').should.be.false;
390+
existsSync('/tmp/mocha-utils-link.js').should.be.false();
391391
utils.lookupFiles('/tmp', ['js'], false).should.eql([]);
392392
});
393393

test/grep.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('Mocha', function(){
4242
describe('"invert" option', function(){
4343
it('should add a Boolean to the mocha.options object', function(){
4444
var mocha = new Mocha({ invert: true });
45-
mocha.options.invert.should.be.ok;
45+
mocha.options.invert.should.be.ok();
4646
})
4747
})
4848
})

test/runnable.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,23 @@ describe('Runnable(title, fn)', function(){
6767
it('should be .async', function(){
6868
var run = new Runnable('foo', function(done){});
6969
run.async.should.equal(1);
70-
run.sync.should.be.false;
70+
run.sync.should.be.false();
7171
})
7272
})
7373

7474
describe('when arity == 0', function(){
7575
it('should be .sync', function(){
7676
var run = new Runnable('foo', function(){});
7777
run.async.should.be.equal(0);
78-
run.sync.should.be.true;
78+
run.sync.should.be.true();
7979
})
8080
})
8181

8282
describe('#globals', function(){
8383
it('should allow for whitelisting globals', function(done){
8484
var test = new Runnable('foo', function(){});
8585
test.async.should.be.equal(0);
86-
test.sync.should.be.true;
86+
test.sync.should.be.true();
8787
test.globals(['foobar']);
8888
test.run(done);
8989
})
@@ -327,7 +327,7 @@ describe('Runnable(title, fn)', function(){
327327
});
328328
test.timeout(10);
329329
test.run(function(err){
330-
err.should.be.ok;
330+
err.should.be.ok();
331331
callCount.should.equal(1);
332332
done();
333333
});
@@ -427,7 +427,7 @@ describe('Runnable(title, fn)', function(){
427427

428428
test.timeout(10);
429429
test.run(function(err){
430-
err.should.be.ok;
430+
err.should.be.ok();
431431
done();
432432
});
433433
})

test/runner.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('Runner', function(){
114114
it ('should not fail when a new common global is introduced', function(){
115115
// verify that the prop isn't enumerable
116116
delete global.XMLHttpRequest;
117-
global.propertyIsEnumerable('XMLHttpRequest').should.not.be.ok;
117+
global.propertyIsEnumerable('XMLHttpRequest').should.not.be.ok();
118118

119119
// create a new runner and keep a reference to the test.
120120
var test = new Test('im a test about bears');
@@ -123,7 +123,7 @@ describe('Runner', function(){
123123

124124
// make the prop enumerable again.
125125
global.XMLHttpRequest = function() {};
126-
global.propertyIsEnumerable('XMLHttpRequest').should.be.ok;
126+
global.propertyIsEnumerable('XMLHttpRequest').should.be.ok();
127127

128128
// verify the test hasn't failed.
129129
newRunner.checkGlobals(test);

test/suite.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@ describe('Suite', function(){
3131
});
3232

3333
it('should copy the bail value', function(){
34-
this.suite.clone().bail().should.be.true;
34+
this.suite.clone().bail().should.be.true();
3535
});
3636

3737
it('should not copy the values from the suites array', function(){
38-
this.suite.clone().suites.should.be.empty;
38+
this.suite.clone().suites.should.be.empty();
3939
});
4040

4141
it('should not copy the values from the tests array', function(){
42-
this.suite.clone().tests.should.be.empty;
42+
this.suite.clone().tests.should.be.empty();
4343
});
4444

4545
it('should not copy the values from the _beforeEach array', function(){
46-
this.suite.clone()._beforeEach.should.be.empty;
46+
this.suite.clone()._beforeEach.should.be.empty();
4747
});
4848

4949
it('should not copy the values from the _beforeAll array', function(){
50-
this.suite.clone()._beforeAll.should.be.empty;
50+
this.suite.clone()._beforeAll.should.be.empty();
5151
});
5252

5353
it('should not copy the values from the _afterEach array', function(){
54-
this.suite.clone()._afterEach.should.be.empty;
54+
this.suite.clone()._afterEach.should.be.empty();
5555
});
5656

5757
it('should not copy the values from the _afterAll array', function(){
58-
this.suite.clone()._afterAll.should.be.empty;
58+
this.suite.clone()._afterAll.should.be.empty();
5959
});
6060
});
6161

@@ -112,14 +112,14 @@ describe('Suite', function(){
112112

113113
describe('when no argument is passed', function(){
114114
it('should return the bail value', function(){
115-
this.suite.bail().should.be.true;
115+
this.suite.bail().should.be.true();
116116
});
117117
});
118118

119119
describe('when argument is passed', function(){
120120
it('should return the Suite object', function(){
121121
var newSuite = this.suite.bail(false);
122-
newSuite.bail().should.be.false;
122+
newSuite.bail().should.be.false();
123123
});
124124
});
125125
});

test/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Test', function(){
2929
});
3030

3131
it('should copy the enableTimeouts value', function(){
32-
this._test.clone().enableTimeouts().should.be.true;
32+
this._test.clone().enableTimeouts().should.be.true();
3333
});
3434

3535
it('should copy the retries value', function(){
@@ -41,7 +41,7 @@ describe('Test', function(){
4141
});
4242

4343
it('should copy the globals value', function(){
44-
this._test.clone().globals().should.not.be.empty;
44+
this._test.clone().globals().should.not.be.empty();
4545
});
4646

4747
it('should copy the parent value', function(){

0 commit comments

Comments
 (0)