@ply-ct/ply
Version:
REST API Automated Testing
48 lines (47 loc) • 1.7 kB
TypeScript
declare type ClassTarget = {
new (...args: any[]): any;
name: string;
};
export interface TestSuite {
name: string;
className: string;
}
/**
* If name arg is not specified, class name is suite name.
*/
export declare function suite(target: ClassTarget): void;
export declare function suite(name: string): (target: ClassTarget) => void;
export interface TestCase {
name: string;
method: Function;
}
/**
* If name arg is not specified, function name is test name.
*/
export declare function test(target: any, propertyKey: string, descriptor: PropertyDescriptor): void;
export declare function test(name: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export interface Before {
name: string;
tests?: string;
method: Function;
hasRun: boolean;
}
/**
* Invoked before tests.
* @param tests glob pattern for test names before which function will be called (* = each, omitted = once before all)
*/
export declare function before(target: any, propertyKey: string, descriptor: PropertyDescriptor): void;
export declare function before(tests: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export interface After {
name: string;
tests?: string;
method: Function;
hasRun: boolean;
}
/**
* Invoked after tests.
* @param tests glob pattern for test names after which function will be called (* = each, omitted = once after all)
*/
export declare function after(target: any, propertyKey: string, descriptor: PropertyDescriptor): void;
export declare function after(tests: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export {};