MCPcopy Index your code
hub / github.com/afar1/fieldtheory-cli / shEngine

Function shEngine

tests/engine-invoke.test.ts:14–24  ·  view source on GitHub ↗

* Integration tests for invokeEngineAsync using /bin/sh as a fake engine * binary. These pin the four behaviors that actually bit us during Phase 1 * end-to-end validation: stdout capture, stderr surfacing on non-zero exit, * stdin-closed so cat-like children don't hang, and fast-kill on timeout.

(name: string, script: string)

Source from the content-addressed store, hash-verified

12 */
13
14function shEngine(name: string, script: string): ResolvedEngine {
15 return {
16 name,
17 label: name,
18 config: {
19 bin: '/bin/sh',
20 // Ignore the prompt — fake engines don't consume it.
21 args: () => ['-c', script],
22 },
23 };
24}
25
26test('invokeEngineAsync: returns trimmed stdout on zero exit', async () => {
27 const { invokeEngineAsync } = await import('../src/engine.js');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected