UNPKG

uvu-jest

Version:

Run the existing jest code with uvu

64 lines 1.81 kB
declare type State = { __test__?: string; __suite__?: string; } & { [key in string]: any; }; declare type Handler = (state: State) => void | Promise<void>; declare type HookRegister = (handler: Handler) => void; declare type TestRegister = (name: string, handler: Handler) => void; export declare type SuiteRegister = (suite: Suite) => void; export declare type PrimaryHook = HookRegister & { each: HookRegister; }; declare type SuiteProps = { before: PrimaryHook; after: HookRegister & { each: HookRegister; }; only: TestRegister; nest: SuiteRegister; skip: () => void; run: () => void; runSync: (filename?: string, suiteNames?: string[]) => Promise<RunnerResponse>; }; export declare type Suite = TestRegister & SuiteProps; export declare class Test { name: string; handler: Handler; constructor(name: string, handler: Handler); } export declare type TestRunner = (filename?: string) => Promise<RunnerResponse>; declare type TestResult = { name: string; result: boolean; errorMessage?: string; }; declare type SuiteResult = { filename?: string; childResults?: SuiteResult[]; suiteName: string; suiteResult: boolean; thisSuiteResult: boolean; testResults: TestResult[]; }; declare type RunnerResponse = { errorMessages: string | true; count: { test: { passed: number; skipped: number; errored: number; }; suite: { passed: number; errored: number; }; }; result: SuiteResult; }; export declare const suite: (name?: string, state?: {}) => Suite; export declare const test: Suite; export declare function exec(bail: boolean): Promise<false | undefined>; export {}; //# sourceMappingURL=index.d.ts.map