Files
kandev/apps/web/components/settings/profile-model-config.test.ts
T
2026-08-08 17:13:50 +01:00

28 lines
787 B
TypeScript

import { describe, expect, it } from "vitest";
import { reconcileConfigOptionValues } from "./profile-model-config";
describe("reconcileConfigOptionValues", () => {
it("keeps supported values and removes values not advertised by the snapshot", () => {
expect(
reconcileConfigOptionValues({ effort: "medium", safe: "on", unknown: "value" }, [
{
type: "select",
id: "effort",
name: "Effort",
current_value: "high",
options: [
{ value: "low", name: "Low" },
{ value: "high", name: "High" },
],
},
{
type: "select",
id: "safe",
name: "Safe mode",
current_value: "on",
},
]),
).toEqual({ safe: "on" });
});
});