intern
Version:
Intern. A next-generation code testing stack for JavaScript.
22 lines (21 loc) • 1.15 kB
TypeScript
import Suite, { SuiteProperties } from '../Suite';
import { TestProperties } from '../Test';
import { Executor } from '../executors/Executor';
export interface TddInterface extends TddLifecycleInterface {
suite(name: string, factory: TddSuiteFactory): void;
test(name: string, test: TestProperties['test']): void;
}
export interface TddLifecycleInterface {
before(fn: SuiteProperties['before']): void;
after(fn: SuiteProperties['after']): void;
beforeEach(fn: SuiteProperties['beforeEach']): void;
afterEach(fn: SuiteProperties['afterEach']): void;
}
export declare type TddSuiteFactory = (suite: Suite) => void;
export declare function suite(name: string, factory: TddSuiteFactory): void;
export declare function test(name: string, test: TestProperties['test']): void;
export declare function before(fn: SuiteProperties['before']): void;
export declare function after(fn: SuiteProperties['after']): void;
export declare function beforeEach(fn: SuiteProperties['beforeEach']): void;
export declare function afterEach(fn: SuiteProperties['afterEach']): void;
export declare function getInterface(executor: Executor): TddInterface;