import { SpawnSyncReturns } from "child_process"; import { ITestEnvironment } from "./environment/doc/response/ITestEnvironment"; import { ICommandDefinition, IHandlerParameters } from "@zowe/imperative"; /** * Execute a CLI script * @export * @param scriptPath - the path to the script * @param testEnvironment - the test environment with env * @param [args=[]] - set of script args (optional) * @returns node.js details about the results of * executing the script, including exit code and output */ export declare function runCliScript(scriptPath: string, testEnvironment: ITestEnvironment, args?: any[]): SpawnSyncReturns; /** * Type for handler data used to build mock IHandlerParameters object. * The type inherits from IHandlerParameters but is different: * - `arguments` omits the required properties `$0` and `_` * - All properties are optional except for `definition` */ type PartialHandlerParameters = Partial> & { arguments?: Record; definition: ICommandDefinition; }; /** * Build a mocked IHandlerParameters object. Includes the following properties: * - `response` - Mocked IHandlerResponseApi * - `arguments` * - `$0` - hardcoded to "zowe" * - `_` = `params.positionals` * - `...params.arguments` * - `positionals` = `params.positionals` * - `profiles` = `params.profiles` * - `definition` = `params.definition` * - `fullDefinition` = `params.definition` * - `stdin` - hardcoded to `process.stdin` * @param params Partial handler parameters object (see above for usage) * @returns Mocked handler parameters object. Most mocks do nothing, but the * following methods call `expect().toMatchSnapshot`: * - `response.data`: `setMessage`, `setObj` * - `response.console`: `log`, `error` * - `response.format`: `output` */ export declare function mockHandlerParameters(params: PartialHandlerParameters): IHandlerParameters; export {}; //# sourceMappingURL=TestUtils.d.ts.map