Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/unitest/mock/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/mock/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>