Skip to content

RunResult

Structured result from runCommand.

Contains the exit code, captured stdout/stderr output, recorded activity events, and an error field that is undefined on success and a CLIError on failure.

Examples

ts
const result = await runCommand(greetCmd, ['World']);

expect(result.exitCode).toBe(0);
expect(result.stdout).toContain('Hello, World!');
expect(result.error).toBeUndefined();

See Also

Released under the MIT License.