UNPKG

fancy-test

Version:

extendable utilities for testing

11 lines (10 loc) 309 B
import { SinonSandbox, SinonStub } from 'sinon'; /** * mocks an object's property */ export default function <T extends Record<string, unknown>, K extends keyof T>(object: T, path: K, fn: (stub: SinonStub) => SinonStub): { run(ctx: { sandbox: SinonSandbox; }): void; finally(): void; };