UNPKG

@mixtape/core

Version:

Supercharged fixture library for organizing and generating test data

8 lines (7 loc) 400 B
import { Fixture } from './fixture'; /** * Create injector function for tests * @param constructorFunc - function used for constructing fixtures * @returns function which can be used to inject fixtures in tests */ export declare function createInjector(constructorFunc: () => Fixture): <T extends void | Promise<void>>(testFunc: (fixture: Fixture, ...args: any[]) => T) => (...args: any[]) => T;