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.
- Import:
@kjanat/dreamcli/testkit - Export kind: interface
- Declared in:
src/core/schema/run.ts - Source link:
packages/dreamcli/src/testkit.ts:23
Examples
ts
const result = await runCommand(greetCmd, ['World']);
expect(result.exitCode).toBe(0);
expect(result.stdout).toContain('Hello, World!');
expect(result.error).toBeUndefined();