MCPcopy
hub / github.com/slopus/happy / finish

Function finish

packages/happy-cli/src/claude/runClaude.test.ts:189–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 const goalActionHandler = registerHandler.mock.calls.find(([method]) => method === 'goal-action')?.[1];
188
189 const finish = async () => {
190 const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {
191 throw new Error('process.exit');
192 }) as never);
193 loopDeferred.resolve(0);
194 await expect(runPromise).rejects.toThrow('process.exit');
195 exitSpy.mockRestore();
196 };
197
198 return {
199 api,

Callers

nothing calls this directly

Calls 3

expectFunction · 0.85
resolveMethod · 0.80
toThrowMethod · 0.80

Tested by

no test coverage detected