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); bail: boolean; executor: Executor; grep: RegExp; name: string | undefined; readonly id: string; readonly parentId: string | undefined; remote: Remote; sessionId: string; readonly numTests: number; readonly numPassedTests: number; readonly numFailedTests: number; readonly numSkippedTests: number; readonly hasParent: boolean; timeout: 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;