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 25, 2024
1 parent 28e977d commit 8ae3c8c
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 @@ -461,6 +461,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 8ae3c8c

Please sign in to comment.