UNPKG

1.15 kBTypeScriptView Raw
1import Suite, { SuiteProperties } from '../Suite';
2import { TestProperties } from '../Test';
3import { Executor } from '../executors/Executor';
4export interface TddInterface extends TddLifecycleInterface {
5 suite(name: string, factory: TddSuiteFactory): void;
6 test(name: string, test: TestProperties['test']): void;
7}
8export interface TddLifecycleInterface {
9 before(fn: SuiteProperties['before']): void;
10 after(fn: SuiteProperties['after']): void;
11 beforeEach(fn: SuiteProperties['beforeEach']): void;
12 afterEach(fn: SuiteProperties['afterEach']): void;
13}
14export declare type TddSuiteFactory = (suite: Suite) => void;
15export declare function suite(name: string, factory: TddSuiteFactory): void;
16export declare function test(name: string, test: TestProperties['test']): void;
17export declare function before(fn: SuiteProperties['before']): void;
18export declare function after(fn: SuiteProperties['after']): void;
19export declare function beforeEach(fn: SuiteProperties['beforeEach']): void;
20export declare function afterEach(fn: SuiteProperties['afterEach']): void;
21export declare function getInterface(executor: Executor): TddInterface;