UNPKG

1.13 kBTypeScriptView Raw
1import Suite, { SuiteProperties } from '../Suite';
2import Test, { TestFunction } from '../Test';
3import { Executor } from '../executors/Executor';
4export default function registerSuite(name: string, descriptorOrFactory: ObjectSuiteDescriptor | ObjectSuiteFactory | Tests): void;
5export declare function getInterface(executor: Executor): {
6 registerSuite(name: string, descriptorOrFactory: ObjectSuiteDescriptor | ObjectSuiteFactory | Tests): void;
7};
8export interface ObjectInterface {
9 registerSuite(name: string, mainDescriptor: ObjectSuiteDescriptor | ObjectSuiteFactory | Tests): void;
10}
11export interface Tests {
12 [name: string]: ObjectSuiteDescriptor | TestFunction | Tests;
13}
14export interface ObjectSuiteDescriptor extends Partial<SuiteProperties> {
15 tests: Tests;
16}
17export interface ObjectSuiteFactory {
18 (): ObjectSuiteDescriptor | Tests;
19}
20export declare function isSuiteDescriptorFactory<T>(value: any): value is T;
21export declare function createSuite<S extends typeof Suite, T extends typeof Test>(name: string, parent: Suite, descriptor: ObjectSuiteDescriptor | Tests, SuiteClass: S, TestClass: T): Suite;