diff --git a/packages/client/connection/tests/fixture-commands.spec.ts b/packages/client/connection/tests/fixture-commands.spec.ts index 6840ec50b3..a71a371973 100644 --- a/packages/client/connection/tests/fixture-commands.spec.ts +++ b/packages/client/connection/tests/fixture-commands.spec.ts @@ -76,8 +76,8 @@ describe('createFixtureApi commands/skills', () => { for (const line of ['/nope', 'plain text', '/']) { const response = await api.commands.execute(req({ sessionId: sid('fx-alpha'), line }), signal) if (!response.result.ok) throw new Error('execute failed') - expect(response.result.value.matched).toBe(false) - expect(response.result.value.result).toBeUndefined() + // Pure admission value: the matched bit is the whole response shape. + expect(response.result.value).toEqual({ matched: false }) } }) diff --git a/packages/ui/commands/tests/commands.spec.ts b/packages/ui/commands/tests/commands.spec.ts index d030b0830b..941db73522 100644 --- a/packages/ui/commands/tests/commands.spec.ts +++ b/packages/ui/commands/tests/commands.spec.ts @@ -307,8 +307,9 @@ describe('CommandService', () => { { type: 'command/run', data: { name: 'deploy', line: '/deploy now', source: { kind: 'user' } } }, { type: 'command/done', data: { kind: 'success', text: 'deployed' } }, ]) - const [run, done] = lifecycle as [{ data: { commandId: string } }, { data: { commandId: string } }] - expect(run.data.commandId).toBe(done.data.commandId) + const ids = lifecycle.map(event => (event.data as { commandId: string }).commandId) + expect(ids[0]).toBeTruthy() + expect(ids[0]).toBe(ids[1]) // Zero-step wrap: the pair stays turn-enclosed on an idle log. expect(agent.session.events.map(event => event.type)).toEqual([ 'turn/start', 'command/run', 'turn/end',