UNPKG

890 BTypeScriptView Raw
1export interface TestCommandOptions {
2 description?: string;
3 stdout?: string | boolean;
4 stderr?: string | boolean;
5 exit?: number;
6 root?: string;
7}
8export declare type TestCommandCallback<T> = (output: T) => Promise<void> | void;
9export interface TestCommand {
10 (args: string[], opts: TestCommandOptions & {
11 stdout: true;
12 stderr: true;
13 }, fn: TestCommandCallback<{
14 stdout: string;
15 stderr: string;
16 }>): void;
17 (args: string[], opts: TestCommandOptions & {
18 stdout: true;
19 }, fn: TestCommandCallback<{
20 stdout: string;
21 }>): void;
22 (args: string[], opts: TestCommandOptions & {
23 stderr: true;
24 }, fn: TestCommandCallback<{
25 stderr: string;
26 }>): void;
27 (args: string[], opts: TestCommandOptions, fn?: TestCommandCallback<{}>): void;
28}
29export declare const testCommand: TestCommand;