import { CancellablePromise } from '@theintern/common'; import Deferred from './Deferred'; import { Executor } from './executors/Executor'; import Test from './Test'; import { InternError } from './types'; import { Remote } from './executors/Node'; export default class Suite implements SuiteProperties { after: SuiteLifecycleFunction | undefined; afterEach: TestLifecycleFunction | undefined; async: ((timeout?: number) => Deferred) | undefined; before: SuiteLifecycleFunction | undefined; beforeEach: TestLifecycleFunction | undefined; error: InternError | undefined; parent: Suite | undefined; publishAfterSetup: boolean; skipped: string | undefined; tests: (Suite | Test)[]; timeElapsed: number | undefined; private _bail; private _executor; private _name; private _grep; private _remote; private _sessionId; private _timeout; constructor(options: SuiteOptions | RootSuiteOptions); get bail(): boolean; set bail(value: boolean); get executor(): Executor; set executor(value: Executor); get grep(): RegExp; set grep(value: RegExp); get name(): string | undefined; set name(value: string | undefined); get id(): string; get parentId(): string | undefined; get remote(): Remote; set remote(value: Remote); get sessionId(): string; set sessionId(value: string); get numTests(): number; get numPassedTests(): number; get numFailedTests(): number; get numSkippedTests(): number; get hasParent(): boolean; get timeout(): number; set timeout(value: number); add(suiteOrTest: Suite | Test): void; private _applyGrepToSuiteOrTest; private _applyGrepToChildren; run(): CancellablePromise; skip(message?: string): void; toJSON(): object; } export declare function isSuite(value: any): value is Suite; export interface SuiteLifecycleFunction { (this: Suite, suite: Suite): void | PromiseLike; } export interface TestLifecycleFunction { (this: Suite, test: Test, suite: Suite): void | PromiseLike; } export interface SuiteProperties { after: SuiteLifecycleFunction | undefined; afterEach: TestLifecycleFunction | undefined; bail: boolean | undefined; before: SuiteLifecycleFunction | undefined; beforeEach: TestLifecycleFunction | undefined; grep: RegExp; name: string | undefined; publishAfterSetup: boolean; timeout: number; } export declare type SuiteOptions = Partial & { name: string; parent: Suite; tests?: (Suite | Test)[]; }; export declare type RootSuiteOptions = Partial & { executor: Executor; tests?: (Suite | Test)[]; }; export declare type LifecycleMethod = keyof Pick;