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