MCPcopy Create free account
hub / github.com/tiann/hapi / getSpawnOptionsOrThrow

Function getSpawnOptionsOrThrow

cli/src/utils/spawnHappyCLI.test.ts:49–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49function getSpawnOptionsOrThrow(): SpawnOptions {
50 expect(spawnMock).toHaveBeenCalledTimes(1);
51 const firstCall = spawnMock.mock.calls[0] as unknown[] | undefined;
52 const options = firstCall?.[2] as SpawnOptions | undefined;
53 if (!options) {
54 throw new Error('Expected spawn options to be passed as third argument');
55 }
56 return options;
57}
58
59describe('spawnHappyCLI windowsHide behavior', () => {
60 beforeAll(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected