






















@@ -186,7 +186,7 @@ describe("codex conversation binding", () => {
186186},
187187});
188188189-await expect(fs.stat(sidecar)).rejects.toMatchObject({ code: "ENOENT" });
189+await expect(fs.stat(sidecar)).rejects.toHaveProperty("code", "ENOENT");
190190});
191191192192it("consumes inbound bound messages when command authorization is absent", async () => {
@@ -334,21 +334,17 @@ describe("codex conversation binding", () => {
334334expect(requests[1]?.params.sandbox).toBe("workspace-write");
335335expect(requests[1]?.params.serviceTier).toBe("priority");
336336expect(requests[1]?.params).not.toHaveProperty("modelProvider");
337-expect(requests[2]?.params).toMatchObject({
338-threadId: "thread-new",
339-approvalPolicy: "on-request",
340-serviceTier: "priority",
341-});
337+expect(requests[2]?.params.threadId).toBe("thread-new");
338+expect(requests[2]?.params.approvalPolicy).toBe("on-request");
339+expect(requests[2]?.params.serviceTier).toBe("priority");
342340const savedBinding = JSON.parse(
343341await fs.readFile(`${sessionFile}.codex-app-server.json`, "utf8"),
344342);
345-expect(savedBinding).toMatchObject({
346-threadId: "thread-new",
347-authProfileId: "work",
348-approvalPolicy: "on-request",
349-sandbox: "workspace-write",
350-serviceTier: "priority",
351-});
343+expect(savedBinding.threadId).toBe("thread-new");
344+expect(savedBinding.authProfileId).toBe("work");
345+expect(savedBinding.approvalPolicy).toBe("on-request");
346+expect(savedBinding.sandbox).toBe("workspace-write");
347+expect(savedBinding.serviceTier).toBe("priority");
352348expect(savedBinding).not.toHaveProperty("modelProvider");
353349});
354350@@ -498,8 +494,8 @@ describe("codex conversation binding", () => {
498494);
499495500496expect(result).toEqual({ handled: true, reply: { text: "done" } });
501-expect(turnStartParams[0]?.input).toMatchObject([
502-{ type: "text", text: "use the fallback prompt" },
497+expect(turnStartParams[0]?.input).toEqual([
498+{ type: "text", text: "use the fallback prompt", text_elements: [] },
503499]);
504500});
505501});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。