import { toBeFunction } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/to_be_function.ts";
Use .toBeFunction
when checking if a value is a Function
import {
defineExpect,
not,
test,
toBeFunction,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toBeFunction,
},
modifierMap: {
not,
},
});
test("passes when value is a function", () => {
expect(() => {}).toBeFunction();
expect(function () {}).toBeFunction();
expect(true).not.toBeFunction();
});