UNPKG

ts-mocks-wallaby

Version:

Use ts-mocks to create Mock<T> objects for during Unit Tests And make sur eit's compatible with wallabyjs.com instrumentation

15 lines (14 loc) 438 B
import { Setup } from './setup'; /** Class for mocking objects/interfaces in Typescript */ export declare class Mock<T> { private _object; private originalPropertyValues; /** Create mock from a Type */ static of<T>(type: { new (): T; }): Mock<T>; constructor(obj?: T); /** Return the mocked object */ readonly Object: T; setup<TProp>(value: (obj: T) => TProp): Setup<T, TProp>; }