mode-menu.test.ts 603 B

123456789101112131415
  1. import { describe, expect, it } from "vitest";
  2. import {
  3. formatAvailableCommandCenterModes,
  4. isSwitchableCommandCenterMode,
  5. } from "../src/command-center/modes.js";
  6. describe("mode menu compatibility", () => {
  7. it("advertises guarded instead of edit while accepting explicit legacy commands", () => {
  8. expect(formatAvailableCommandCenterModes()).toBe("plan, build, guarded, yolo");
  9. for (const mode of ["plan", "build", "edit", "guarded", "yolo"]) {
  10. expect(isSwitchableCommandCenterMode(mode)).toBe(true);
  11. }
  12. expect(isSwitchableCommandCenterMode("unknown")).toBe(false);
  13. });
  14. });