Skip to content

Commit 25b047e

Browse files
committed
Add more tests to should interface
1 parent b696271 commit 25b047e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/should.js

+12
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,18 @@ describe('should', function() {
339339
}, "expected '' to be false")
340340
});
341341

342+
it('callable', function() {
343+
(function() {}).should.be.callable;
344+
(async function() {}).should.be.callable;
345+
(function* () {}).should.be.callable;
346+
(async function*() {}).should.be.callable;
347+
true.should.not.be.callable;
348+
349+
err(function(){
350+
''.should.be.callable;
351+
}, "expected '' to be a callable function")
352+
});
353+
342354
it('null', function(){
343355
(0).should.not.be.null;
344356

0 commit comments

Comments
 (0)