

























@@ -53,28 +53,27 @@ describe("codex plugin", () => {
5353| [unknown]
5454| undefined;
555556-expect(providerRegistration).toMatchObject({ id: "codex", label: "Codex" });
57-expect(agentHarnessRegistration).toMatchObject({
58-id: "codex",
59-label: "Codex agent harness",
60-deliveryDefaults: { sourceVisibleReplies: "message_tool" },
56+expect(providerRegistration.id).toBe("codex");
57+expect(providerRegistration.label).toBe("Codex");
58+expect(agentHarnessRegistration.id).toBe("codex");
59+expect(agentHarnessRegistration.label).toBe("Codex agent harness");
60+expect(agentHarnessRegistration.deliveryDefaults).toEqual({
61+sourceVisibleReplies: "message_tool",
6162});
6263expect(typeof agentHarnessRegistration.dispose).toBe("function");
63-expect(mediaProviderRegistration).toMatchObject({
64-id: "codex",
65-capabilities: ["image"],
66-defaultModels: { image: "gpt-5.5" },
67-});
64+expect(mediaProviderRegistration?.id).toBe("codex");
65+expect(mediaProviderRegistration?.capabilities).toEqual(["image"]);
66+expect(mediaProviderRegistration?.defaultModels).toEqual({ image: "gpt-5.5" });
6867expect(typeof mediaProviderRegistration?.describeImage).toBe("function");
6968expect(typeof mediaProviderRegistration?.describeImages).toBe("function");
70-expect(registerCommand.mock.calls[0]?.[0]).toMatchObject({
71- name: "codex",
72- description: "Inspect and control the Codex app-server harness",
73-});
74-expect(registerMigrationProvider.mock.calls[0]?.[0]).toMatchObject({
75- id: "codex",
76- label: "Codex",
77-});
69+const commandRegistration = registerCommand.mock.calls[0]?.[0];
70+expect(commandRegistration?.name).toBe("codex");
71+expect(commandRegistration?.description).toBe(
72+ "Inspect and control the Codex app-server harness",
73+);
74+const migrationRegistration = registerMigrationProvider.mock.calls[0]?.[0];
75+expect(migrationRegistration?.id).toBe("codex");
76+expect(migrationRegistration?.label).toBe("Codex");
7877expect(inboundClaimRegistration?.[0]).toBe("inbound_claim");
7978expect(typeof inboundClaimRegistration?.[1]).toBe("function");
8079expect(typeof bindingResolvedRegistration?.[0]).toBe("function");
@@ -112,12 +111,11 @@ describe("codex plugin", () => {
112111harness.supports({ provider: "codex", modelId: "gpt-5.4", requestedRuntime: "auto" })
113112.supported,
114113).toBe(true);
115-expect(
116-harness.supports({
117-provider: "openai-codex",
118-modelId: "gpt-5.4",
119-requestedRuntime: "auto",
120-}),
121-).toMatchObject({ supported: false });
114+const unsupported = harness.supports({
115+provider: "openai-codex",
116+modelId: "gpt-5.4",
117+requestedRuntime: "auto",
118+});
119+expect(unsupported.supported).toBe(false);
122120});
123121});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。