Urara-Blog/node_modules/.pnpm-store/v3/files/35/39f01373d203fc5969c9205a56d63977ce2d67d3177c2c522c45a4fc0d297ddd3553a9cc1ef095ea63efe0773525763c587de50056eeb3a030ec3f03ecf95b
2022-08-14 01:14:53 +08:00

27 lines
751 B
Text

declare namespace uvu {
type Crumbs = { __suite__: string; __test__: string };
type Callback<T> = (context: T & Crumbs) => Promise<void> | void;
interface Hook<T> {
(hook: Callback<T>): void;
each(hook: Callback<T>): void;
}
interface Test<T> {
(name: string, test: Callback<T>): void;
only(name: string, test: Callback<T>): void;
skip(name?: string, test?: Callback<T>): void;
before: Hook<T>;
after: Hook<T>
run(): void;
}
}
type Context = Record<string, any>;
export type Test<T=Context> = uvu.Test<T>;
export type Callback<T=Context> = uvu.Callback<T>;
export const test: uvu.Test<Context>;
export function suite<T=Context>(title?: string, context?: T): uvu.Test<T>;
export function exec(bail?: boolean): Promise<void>;