mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
fix(agent): COD-549 report readiness failures with empty errors
This commit is contained in:
1 parent
af4b65697a
commit
d25d71b595
2 files changed
+16
-1
No files matched your search
@@ -577,6 +577,21 @@ describe('agent spawn', () => {
|
||||
{ method: 'GET', path: `/api/v1/sessions/${OTHER}/wait-output` },
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ error: new Error(''), kind: 'Error' },
|
||||
{ error: '', kind: 'string' },
|
||||
])('reports a readiness failure when the thrown $kind has no message', async ({ error }) => {
|
||||
const deps = fakeDeps((options) => {
|
||||
if (options.path === '/api/v1/quick-start') return ok({ sessionId: OTHER });
|
||||
throw error;
|
||||
}, true);
|
||||
|
||||
expect(await agentSpawn(deps, { caseName: 'c', mode: 'claude', ready: true, timeoutMs: 1000 })).toBe(EXIT.error);
|
||||
expect(deps.out).toHaveLength(1);
|
||||
expect(JSON.parse(deps.out[0])).toEqual({ sessionId: OTHER, readinessError: 'Readiness request failed' });
|
||||
expect(deps.calls).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('session id prefixes', () => {
|
||||
|
||||
Reference in new issue
Block a user