twd-js
Version:
Test While Developing (TWD) - in-browser testing
19 lines (18 loc) • 558 B
TypeScript
export type TestFn = () => Promise<void> | void;
export interface TestCase {
name: string;
fn: TestFn;
status?: "idle" | "pass" | "fail" | "skip" | "running";
only?: boolean;
skip?: boolean;
logs?: string[];
suite: string[];
}
export declare const tests: TestCase[];
export declare const register: (name: string, fn: TestFn, opts?: {
only?: boolean;
skip?: boolean;
}) => void;
export declare const clearTests: () => void;
export declare const pushSuite: (name: string) => void;
export declare const popSuite: () => void;