Skip to main content
Module

x/unitest/mod.ts>isMockObject

🃏 Deno-first universal unit testing framework
Latest
function isMockObject
import { isMockObject } from "https://deno.land/x/unitest@v1.0.0-beta.82/mod.ts";

Whatever argument is MockObject or not.

import {
  expect,
  fn,
  isMockObject,
  test,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";

test("should be mock object", () => {
  const mockObject = fn();
  expect(isMockObject(mockObject)).toBeTruthy();
  expect(isMockObject({})).toBeFalsy();
});

Type Parameters

optional
A extends readonly unknown[] = any[]
optional
R = unknown

Parameters

value: object

Returns

value is MockObject<A, R>