MCPcopy Create free account
hub / github.com/garrytan/gstack / run

Function run

test/benchmark-cli.test.ts:23–35  ·  view source on GitHub ↗
(args: string[], opts: { env?: Record<string, string> } = {})

Source from the content-addressed store, hash-verified

21const BIN = path.join(ROOT, 'bin', 'gstack-model-benchmark');
22
23function run(args: string[], opts: { env?: Record<string, string> } = {}): { status: number | null; stdout: string; stderr: string } {
24 const result = spawnSync('bun', ['run', BIN, ...args], {
25 cwd: ROOT,
26 env: { ...process.env, ...opts.env },
27 encoding: 'utf-8',
28 timeout: 15000,
29 });
30 return {
31 status: result.status,
32 stdout: result.stdout?.toString() ?? '',
33 stderr: result.stderr?.toString() ?? '',
34 };
35}
36
37describe('gstack-model-benchmark --dry-run', () => {
38 test('prints provider availability report and exits 0', () => {

Callers 1

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected