UNPKG

@wdio/cli

Version:
82 lines • 3.16 kB
import { SevereServiceError } from 'webdriverio'; import type { Capabilities, Services } from '@wdio/types'; import type { OnCompleteResult, ReplCommandArguments } from './types.js'; /** * True when a path, glob, or require entry looks like TypeScript source. */ export declare function looksLikeTypeScriptPath(value: string): boolean; /** * Decide whether the launcher / worker processes need the tsx loader. */ export declare function shouldEnableTsx(configFilePath: string, args?: Partial<{ tsConfigPath?: string; }>, config?: Partial<WebdriverIO.Config>, capabilities?: Capabilities.TestrunnerCapabilities): boolean; /** * Ensure tsx is registered for the current process and inherited by workers. */ export declare function enableTsx(importMetaUrl?: string): Promise<string>; export declare class HookError extends SevereServiceError { origin: string; constructor(message: string, origin: string); } /** * run service launch sequences */ export declare function runServiceHook(launcher: Services.ServiceInstance[], hookName: keyof Services.HookFunctions, ...args: unknown[]): Promise<undefined>; /** * Run hook in service launcher * @param {Array|Function} hook - can be array of functions or single function * @param {object} config * @param {object} capabilities */ export declare function runLauncherHook(hook: Function | Function[], ...args: unknown[]): Promise<void | any[]>; /** * Run onCompleteHook in Launcher * @param {Array|Function} onCompleteHook - can be array of functions or single function * @param {*} config * @param {*} capabilities * @param {*} exitCode * @param {*} results */ export declare function runOnCompleteHook(onCompleteHook: Function | Function[], config: WebdriverIO.Config, capabilities: Capabilities.TestrunnerCapabilities, exitCode: number, results: OnCompleteResult): Promise<(0 | 1)[]>; /** * get runner identification by caps */ export declare function getRunnerName(caps?: WebdriverIO.Capabilities): string; export declare function getCapabilities(arg: ReplCommandArguments): Promise<{ capabilities: { 'appium:deviceName': string; 'appium:platformVersion': string; 'appium:udid': string; platformName: string; 'appium:automationName': string; 'appium:app': string; browserName?: undefined; }; } | { capabilities: { 'appium:deviceName': string; 'appium:platformVersion': string; 'appium:udid': string; platformName: string; 'appium:automationName': string; browserName: string; }; } | { capabilities: { alwaysMatch: WebdriverIO.Capabilities; firstMatch: WebdriverIO.Capabilities[]; browserName?: undefined; }; } | { capabilities: { browserName: string; }; }>; type CLIParams = { [x: string]: boolean | string | number | (string | boolean | number)[]; }; export declare function coerceOpts(types: Record<string, string>, opts: CLIParams): CLIParams; export declare function coerceOptsFor(framework: 'cucumber' | 'mocha' | 'jasmine'): (opts: CLIParams) => CLIParams; export {}; //# sourceMappingURL=utils.d.ts.map