zcodeAgentRuntime.test.ts 694 B

12345678910111213141516
  1. import { describe, expect, it } from "vitest";
  2. import { ZCODE_AGENT_RUNTIME } from "@zcode/shared";
  3. describe("ZCode Agent runtime", () => {
  4. it("starts the private ZCode Protocol server instead of the retired ZCode Agent command", () => {
  5. const retiredProtocolName = `${"a"}${"cp"}`;
  6. expect(ZCODE_AGENT_RUNTIME.spawnArgs).toEqual(["app-server", "--stdio"]);
  7. expect(ZCODE_AGENT_RUNTIME.spawnArgs).not.toContain(retiredProtocolName);
  8. });
  9. it("uses the ZCode Agent binary name", () => {
  10. expect(ZCODE_AGENT_RUNTIME.resolveEntrySegments("darwin")).toEqual(["zcode-agent"]);
  11. expect(ZCODE_AGENT_RUNTIME.resolveEntrySegments("win32")).toEqual(["zcode-agent.exe"]);
  12. });
  13. });