MCPcopy Index your code
hub / github.com/callstack/agent-device / runCli

Function runCli

test/integration/smoke-cli.test.ts:5–12  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

3import { runCmdSync } from '../../src/utils/exec.ts';
4
5function runCli(args: string[]): { status: number; stdout: string; stderr: string } {
6 const result = runCmdSync(
7 process.execPath,
8 ['--experimental-strip-types', 'src/bin.ts', ...args],
9 { allowFailure: true },
10 );
11 return { status: result.exitCode, stdout: result.stdout ?? '', stderr: result.stderr ?? '' };
12}
13
14test('cli --help returns usage', () => {
15 const result = runCli(['--help']);

Callers 2

runCliJsonFunction · 0.90
smoke-cli.test.tsFile · 0.70

Calls 1

runCmdSyncFunction · 0.90

Tested by

no test coverage detected