@jakechampion/cli-testing-library
Version:
Small but powerful library for testing CLI the way it is used by people.
14 lines (13 loc) • 495 B
TypeScript
import { Output } from './Output';
import { ChildProcessWithoutNullStreams } from 'child_process';
export type ExitCode = 0 | 1;
export type ExecResult = {
code: ExitCode;
stdout: string[];
stderr: string[];
};
export declare const createExecute: (base: string, output: Output, currentProcessRef?: {
current: ChildProcessWithoutNullStreams | null;
}, exitCodeRef?: {
current: ExitCode | null;
}) => (runner: string, command: string, runFrom?: string) => Promise<ExecResult>;