import { CoverageMap } from 'istanbul-lib-coverage'; import { Instrumenter } from 'istanbul-lib-instrument'; import { MapStore } from 'istanbul-lib-source-maps'; import { CancellablePromise } from '@theintern/common'; import Command from '@theintern/leadfoot/Command'; import Tunnel, { DownloadProgressEvent } from '@theintern/digdug/Tunnel'; import { Config, EnvironmentSpec } from '../common/config'; import Executor, { Events, Plugins } from './Executor'; import Environment from '../Environment'; import Server from '../Server'; import Suite from '../Suite'; import { RuntimeEnvironment } from '../types'; export default class Node extends Executor { server: Server | undefined; tunnel: Tunnel | undefined; protected _coverageMap: CoverageMap; protected _coverageFiles: string[]; protected _loadingFunctionalSuites: boolean | undefined; protected _instrumentBasePath: string | undefined; protected _instrumenter: Instrumenter | undefined; protected _sourceMaps: MapStore; protected _instrumentedMaps: MapStore; protected _unhookRequire: (() => void) | undefined; protected _sessionSuites: Suite[] | undefined; constructor(options?: { [key in keyof Config]?: any; }); get coverageMap(): CoverageMap; get environment(): RuntimeEnvironment; get instrumentedMapStore(): MapStore; get sourceMapStore(): MapStore; get hasCoveredFiles(): boolean; get suites(): Suite[]; addSuite(factory: (parentSuite: Suite) => void): void; getTunnel(name: string): typeof Tunnel; instrumentCode(code: string, filename: string, shouldCompile?: boolean): string; loadScript(script: string | string[]): CancellablePromise; registerTunnel(name: string, Ctor: typeof Tunnel): void; shouldInstrumentFile(filename: string): boolean; protected _afterRun(): CancellablePromise; protected _beforeRun(): CancellablePromise; protected _createTunnel(): Tunnel; protected _createSessionSuites(): void; protected _loadFunctionalSuites(): CancellablePromise; protected _loadSuites(): CancellablePromise; protected _resolveConfig(): CancellablePromise; protected _getSeleniumDriverNames(): string[]; protected _runTests(): CancellablePromise; protected _runRemoteTests(): CancellablePromise; protected _setInstrumentationHooks(): void; protected _removeInstrumentationHooks(): void; } export { Config, EnvironmentSpec }; export interface NodePlugins extends Plugins { tunnel: typeof Tunnel; } export interface Remote extends Command { environmentType?: Environment; requestedEnvironment?: Environment; setHeartbeatInterval(delay: number): Command; } export interface TunnelMessage { tunnel: Tunnel; progress?: DownloadProgressEvent; status?: string; } export interface NodeEvents extends Events { serverEnd: Server; serverStart: Server; tunnelDownloadProgress: TunnelMessage; tunnelStart: TunnelMessage; tunnelStatus: TunnelMessage; tunnelStop: TunnelMessage; }