56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
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("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,
|
|
});
|
|
});
|
|
});
|