Skip to main content
Module

x/unitest/mod.ts>toBeObject

🃏 Deno-first universal unit testing framework
Latest
function toBeObject
Re-export
import { toBeObject } from "https://deno.land/x/unitest@v1.0.0-beta.82/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();
});

Parameters

actual: unknown