Просмотр исходного кода

test(apiproxy): drop the carrier-signal case for the removed command route

`command.execute` no longer exists on the API Proxy, and the fake's own
handler went with it, so the case only reached a 404 body. The same carrier
behaviour is asserted on live routes by its `session.search`,
`subagent.prompt` and `host.pickDirectory` siblings.
imccyu 1 месяц назад
Родитель
Сommit
91e7b3d086
1 измененных файлов с 0 добавлено и 14 удалено
  1. 0 14
      packages/host/apiproxy/tests/fetch-carrier.spec.ts

+ 0 - 14
packages/host/apiproxy/tests/fetch-carrier.spec.ts

@@ -505,20 +505,6 @@ describe('unary round trip (handler ⇄ client, no network)', () => {
     expect(handlerSignal.aborted).toBe(true)
   })
 
-  it('propagates the carrier Request signal into command.execute', async () => {
-    const handler = toFetchHandler(fakeApi())
-    const controller = new AbortController()
-    const body = JSON.stringify({ type: 'client-request', rpcId: 'r-sig', method: 'command.execute', payload: { sessionId: 's', line: '/hang' } })
-    // The fake's /hang settles only when the invoke-level signal aborts: a
-    // completed response with the cancelled error proves req.signal reached it.
-    const pending = handler.fetch(new Request('http://x/api/command.execute', { method: 'POST', headers: { 'content-type': 'application/json' }, body, signal: controller.signal }))
-    controller.abort()
-    const response = await pending
-    const parsed = await response.json() as { rpcId: string; result: { ok: boolean; error?: { code: string } } }
-    expect(parsed.rpcId).toBe('r-sig')
-    expect(parsed.result.error?.code).toBe('cancelled')
-  })
-
   it('propagates the carrier Request signal into session.search', async () => {
     const handler = toFetchHandler(fakeApi())
     const controller = new AbortController()