UNPKG

@jakechampion/cli-testing-library

Version:

Small but powerful library for testing CLI the way it is used by people.

18 lines (17 loc) 639 B
export type OutputType = 'stdout' | 'stderr'; export type InternalOutputType = '_stdout' | '_stderr'; export declare class Output { private _stdoutHandlers; private _stderrHandlers; private _stdout; private _stderr; replaceStrings: Record<string, string>; get stdout(): string[]; set stdout(value: string[]); get stderr(): string[]; set stderr(value: string[]); private processStdLineSet; private processStdLineGet; on: (handler: (line: string, type: OutputType) => void, type?: OutputType) => void; off: (handler: (line: string, type: OutputType) => void, type?: OutputType) => void; }