RunResult
Structured result from runCommand.
- Contains the exit code, captured stdout/stderr output, recorded
- activity events, and an
errorfield. errorisundefinedwhen execution completed without throwing, even if- the handler requested a non-zero status via Out.setExitCode.
- Import:
@kjanat/dreamcli/testkit - Export kind: interface
- Declared in:
src/core/schema/run.ts - Source link:
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();