import { describe, expect, it } from "vitest"; import { instanceExperimentalSettingsSchema, patchInstanceExperimentalSettingsSchema, } from "./instance.js"; describe("instance experimental settings validators", () => { it("defaults the server info debug view off", () => { const settings = instanceExperimentalSettingsSchema.parse({}); expect(settings.enableServerInfoDebugView).toBe(false); }); it("defaults workspace branch forward reconciliation off", () => { const settings = instanceExperimentalSettingsSchema.parse({}); expect(settings.enableWorkspaceBranchReconcileForward).toBe(false); }); it("defaults the goals sidebar link off", () => { const settings = instanceExperimentalSettingsSchema.parse({}); expect(settings.enableGoalsSidebarLink).toBe(false); }); it("defaults worktree run execution off", () => { const settings = instanceExperimentalSettingsSchema.parse({}); expect(settings.enableWorktreeRunExecution).toBe(false); }); it("defaults built-in agents off", () => { const settings = instanceExperimentalSettingsSchema.parse({}); expect(settings.enableBuiltInAgents).toBe(false); }); it("accepts worktree run execution patches", () => { expect( patchInstanceExperimentalSettingsSchema.parse({ enableWorktreeRunExecution: true, }), ).toEqual({ enableWorktreeRunExecution: true, }); }); it("accepts server info debug view patches", () => { expect( patchInstanceExperimentalSettingsSchema.parse({ enableServerInfoDebugView: true, }), ).toEqual({ enableServerInfoDebugView: true, }); }); it("accepts workspace branch forward reconciliation patches", () => { expect( patchInstanceExperimentalSettingsSchema.parse({ enableWorkspaceBranchReconcileForward: true, }), ).toEqual({ enableWorkspaceBranchReconcileForward: true, }); }); it("accepts goals sidebar link patches", () => { expect( patchInstanceExperimentalSettingsSchema.parse({ enableGoalsSidebarLink: true, }), ).toEqual({ enableGoalsSidebarLink: true, }); }); it("accepts built-in agents patches", () => { expect( patchInstanceExperimentalSettingsSchema.parse({ enableBuiltInAgents: true, }), ).toEqual({ enableBuiltInAgents: true, }); }); });