@@ -2586,11 +2586,10 @@ describe("runCodexAppServerAttempt", () => {
|
2586 | 2586 | }, |
2587 | 2587 | }); |
2588 | 2588 | |
2589 | | -await expect(run).resolves.toMatchObject({ |
2590 | | -assistantTexts: ["final completion"], |
2591 | | -aborted: false, |
2592 | | -timedOut: false, |
2593 | | -}); |
| 2589 | +const result = await run; |
| 2590 | +expect(result.assistantTexts).toEqual(["final completion"]); |
| 2591 | +expect(result.aborted).toBe(false); |
| 2592 | +expect(result.timedOut).toBe(false); |
2594 | 2593 | }); |
2595 | 2594 | |
2596 | 2595 | it("releases completion when a projector callback throws during turn/completed", async () => { |
@@ -2641,10 +2640,9 @@ describe("runCodexAppServerAttempt", () => {
|
2641 | 2640 | }, |
2642 | 2641 | }, |
2643 | 2642 | }); |
2644 | | -await expect(run).resolves.toMatchObject({ |
2645 | | -aborted: false, |
2646 | | -timedOut: false, |
2647 | | -}); |
| 2643 | +const result = await run; |
| 2644 | +expect(result.aborted).toBe(false); |
| 2645 | +expect(result.timedOut).toBe(false); |
2648 | 2646 | }); |
2649 | 2647 | |
2650 | 2648 | it("routes MCP approval elicitations through the native bridge", async () => { |
@@ -2710,12 +2708,11 @@ describe("runCodexAppServerAttempt", () => {
|
2710 | 2708 | content: { approve: true }, |
2711 | 2709 | _meta: null, |
2712 | 2710 | }); |
2713 | | -expect(bridgeSpy).toHaveBeenCalledWith( |
2714 | | -expect.objectContaining({ |
2715 | | -threadId: "thread-1", |
2716 | | -turnId: "turn-1", |
2717 | | -}), |
2718 | | -); |
| 2711 | +const [bridgeCall] = bridgeSpy.mock.calls[0] as unknown as [ |
| 2712 | +{ threadId?: string; turnId?: string }, |
| 2713 | +]; |
| 2714 | +expect(bridgeCall.threadId).toBe("thread-1"); |
| 2715 | +expect(bridgeCall.turnId).toBe("turn-1"); |
2719 | 2716 | |
2720 | 2717 | await notify({ |
2721 | 2718 | method: "turn/completed", |
|