Skip to content

Commit

Permalink
Add more tests to should interface
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Jan 24, 2024
1 parent b696271 commit 25b047e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/should.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,18 @@ describe('should', function() {
}, "expected '' to be false")
});

it('callable', function() {
(function() {}).should.be.callable;
(async function() {}).should.be.callable;
(function* () {}).should.be.callable;
(async function*() {}).should.be.callable;
true.should.not.be.callable;

err(function(){
''.should.be.callable;
}, "expected '' to be a callable function")
});

it('null', function(){
(0).should.not.be.null;

Expand Down

0 comments on commit 25b047e

Please sign in to comment.