Files
openclaw/extensions/codex/src/command-rpc.test.ts
2026-06-04 21:40:44 -04:00

18 lines
606 B
TypeScript

// Codex tests cover command rpc plugin behavior.
import { describe, expect, it } from "vitest";
import { CodexAppServerRpcError } from "./app-server/client.js";
import { safeValue } from "./command-rpc.js";
describe("Codex command RPC helpers", () => {
it("formats unsupported control methods from JSON-RPC error codes", async () => {
await expect(
safeValue(async () => {
throw new CodexAppServerRpcError({ code: -32601, message: "Method not found" }, "x/y");
}),
).resolves.toEqual({
ok: false,
error: "unsupported by this Codex app-server",
});
});
});