/** * @module SlimRunner */ import { Test } from '../Test'; import { Group } from '../Group'; import { Assert } from '../Assert'; import { ICallback, IConfigureOptions } from '../Contracts'; /** * The type for the arguments to be passed to a * test */ declare type TestArgs = [Assert, Function]; /** * The type for the arguments to be passed to a * hook */ declare type HookArgs = [Function]; /** * Group instance exposed by slim runner */ declare type RunnerGroup = Pick, Exclude, 'run' | 'toJSON' | 'test'>>; /** * Test instance exposed by slim runner */ declare type RunnerTest = Pick, Exclude, 'run' | 'toJSON'>>; /** * Create a new test */ export declare function test(title: string, callback: ICallback): RunnerTest; /** * Run all the tests using the runner */ export declare function run(exitProcess?: boolean): Promise; export declare namespace test { /** * Create a new test to group all test together */ function group(title: string, callback: (group: RunnerGroup) => void): void; /** * Only run the specified test */ function only(title: string, callback: ICallback): RunnerTest; /** * Create a test, and mark it as skipped. Skipped functions are * never executed. However, their hooks are executed */ function skip(title: string, callback: ICallback): RunnerTest; /** * Create a test, and mark it as skipped only when running in CI. Skipped * functions are never executed. However, their hooks are executed. */ function skipInCI(title: string, callback: ICallback): RunnerTest; /** * Create a test and run it only in the CI. */ function runInCI(title: string, callback: ICallback): RunnerTest; /** * Create regression test */ function failing(title: string, callback: ICallback): RunnerTest; /** * Configure test runner */ function configure(options: Partial): void; /** * Nested only */ namespace failing { /** * Only run the specified test */ function only(title: string, callback: ICallback): RunnerTest; } } export {};