Skip to content

Commit 8ae3c8c

Browse files
committed
Add more tests to should interface
1 parent 28e977d commit 8ae3c8c

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
@@ -461,6 +461,18 @@ describe("should", function () {
461461
}, "expected '' to be false");
462462
});
463463

464+
it("callable", function () {
465+
(function () {}).should.be.callable;
466+
(async function () {}).should.be.callable;
467+
(function* () {}).should.be.callable;
468+
(async function* () {}).should.be.callable;
469+
true.should.not.be.callable;
470+
471+
err(function () {
472+
"".should.be.callable;
473+
}, "expected '' to be a callable function");
474+
});
475+
464476
it("null", function () {
465477
(0).should.not.be.null;
466478

0 commit comments

Comments
 (0)