

























@@ -1878,7 +1878,7 @@ describe("runCodexAppServerAttempt", () => {
18781878},
18791879]),
18801880);
1881-expect(agentEvents.some((event) => event.stream === "assistant")).toBe(false);
1881+expect(agentEvents.filter((event) => event.stream === "assistant")).toEqual([]);
18821882expect(agentEnd).toHaveBeenCalledWith(
18831883expect.objectContaining({
18841884success: false,
@@ -1982,13 +1982,12 @@ describe("runCodexAppServerAttempt", () => {
19821982await waitForMethod("turn/start");
1983198319841984expect(queueAgentHarnessMessage("session-1", "more context", { debounceMs: 1 })).toBe(true);
1985-await vi.waitFor(
1986-() => expect(requests.some((entry) => entry.method === "turn/steer")).toBe(true),
1987-{ interval: 1 },
1988-);
1985+await vi.waitFor(() => expect(requests.map((entry) => entry.method)).toContain("turn/steer"), {
1986+interval: 1,
1987+});
19891988expect(abortAgentHarnessRun("session-1")).toBe(true);
19901989await vi.waitFor(
1991-() => expect(requests.some((entry) => entry.method === "turn/interrupt")).toBe(true),
1990+() => expect(requests.map((entry) => entry.method)).toContain("turn/interrupt"),
19921991{ interval: 1 },
19931992);
19941993@@ -2164,7 +2163,7 @@ describe("runCodexAppServerAttempt", () => {
21642163params.onBlockReply = vi.fn();
21652164const run = runCodexAppServerAttempt(params);
21662165await vi.waitFor(
2167-() => expect(request.mock.calls.some(([method]) => method === "turn/start")).toBe(true),
2166+() => expect(request.mock.calls.map(([method]) => method)).toContain("turn/start"),
21682167{ interval: 1 },
21692168);
21702169await vi.waitFor(() => expect(handleRequest).toBeTypeOf("function"), { interval: 1 });
@@ -2409,7 +2408,7 @@ describe("runCodexAppServerAttempt", () => {
24092408};
24102409const run = runCodexAppServerAttempt(params);
24112410await vi.waitFor(() =>
2412-expect(request.mock.calls.some(([method]) => method === "turn/start")).toBe(true),
2411+expect(request.mock.calls.map(([method]) => method)).toContain("turn/start"),
24132412);
24142413await notify({
24152414method: "turn/completed",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。