tape-modern
Version:
Minimum viable TAP-compliant testing framework
21 lines (20 loc) • 758 B
TypeScript
export declare const done: Promise<{}>;
export declare const test: ((name: string, fn: (t: Assertions) => void | Promise<void>) => void) & {
skip(name: string, fn: (t: Assertions) => void | Promise<void>): void;
only(name: string, fn: (t: Assertions) => void | Promise<void>): void;
};
export declare type Assertions = {
fail: (msg?: string) => void;
pass: (msg?: string) => void;
ok: (value: any, msg?: string) => void;
equal: (a: any, b: any, msg?: string) => void;
throws: (fn: () => any, err: any, msg?: string) => void;
};
export declare type Test = {
name: string;
fn: (t: Assertions) => Promise<void> | void;
skip: boolean;
only: boolean;
shouldRun: boolean;
};
export declare const assert: Assertions;