good-vibes
Version:
Good Vibes is a Node.js testing library inspired by Alicia Keys Tiny Desk Concert
37 lines • 1.38 kB
TypeScript
import Context from "./Context";
import TestContext from "./TestContext";
interface BeforeAfter {
(context: Context): void;
}
interface AsyncTest {
(context: TestContext): void;
}
export interface TestResult {
name: string;
status: boolean;
group: string;
message?: string;
}
interface Options {
timeout?: number;
snapshotsDirectory?: string;
returnCodeOnFailure?: number;
reportTestResults?: boolean;
testResultsDirectory?: string;
executionTimePrecision?: number;
}
export declare const DEBUG = "Debug";
export declare const calculateExecutionTime: (startTime: number, endTime: number, precision?: number) => number;
export declare const group: (groupName: string) => {
before: (fn: BeforeAfter, overriddenGroupName?: string) => void;
test: (name: string, testImplementation: AsyncTest, overriddenGroupName?: string) => void;
after: (fn: BeforeAfter, overriddenGroupName?: string) => void;
sync: () => void;
};
export declare const sync: (group?: string) => void;
export declare const before: (fn: BeforeAfter, group?: string) => void;
export declare const after: (fn: BeforeAfter, group?: string) => void;
export declare const test: (name: string, testImplementation: AsyncTest, group?: string) => void;
declare const run: (options?: Options) => Promise<never>;
export default run;
//# sourceMappingURL=index.d.ts.map