test(runner): assert admitted ACPX turn contract

This commit is contained in:
Dotta 2026-09-03 05:53:46 -05:00
parent fd16a3f9c7
commit 82a739a580
1 changed files with 9 additions and 8 deletions

View File

@ -1286,14 +1286,15 @@ describe("Codex ACPX runtime adapter", () => {
const signal = new AbortController().signal;
const onElicitation = vi.fn();
expect(
port.startTurn({
text: "Complete the task.",
requestId: "turn-1",
signal,
onElicitation,
}),
).toBe(turn);
const admittedTurn = port.startTurn({
text: "Complete the task.",
requestId: "turn-1",
signal,
onElicitation,
});
expect(admittedTurn.requestId).toBe(turn.requestId);
await expect(admittedTurn.promptStarted).resolves.toBeUndefined();
await expect(admittedTurn.result).resolves.toEqual({ status: "completed" });
expect(runtime.startTurn).toHaveBeenCalledWith({
handle: HANDLE,
text: "Complete the task.",