Skip to content

Commit

Permalink
Add should test for callable
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Jan 25, 2024
1 parent 67635ea commit a861d3d
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 @@ -337,6 +337,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 a861d3d

Please sign in to comment.