UNPKG

jasmine-automock

Version:

A small library used to mock an instance of a class using jasmine, perfect for mocking injected dependencies.

9 lines (7 loc) 204 B
import { Type } from './interfaces/type'; export function autoMock<T>(ref: Type<T>): jasmine.SpyObj<T> { return jasmine.createSpyObj( ref.name, Object.getOwnPropertyNames(ref.prototype) ); }