Files
OmniRoute/tests/unit/custom-system-prompt-settings-persistence.test.ts
Rouzbeh† 9fd19f5522 fix(settings): add customSystemPrompt fields to updateSettingsSchema (#10865) (#10890)
Reconciliado com a release (mesmo drift dos PRs irmãos em typecheck-baseline/glm.ts/fetchTimeout.ts/stryker.conf.json). Validado: lint limpo, teste focado passando. Fix real (schema Zod não incluía customSystemPromptEnabled/customSystemPrompt, causando perda silenciosa da configuração). CI vermelho é o base-red já rastreado em #9985. Obrigado!
2026-08-21 04:11:14 -03:00

16 lines
546 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { updateSettingsSchema } from "@/shared/validation/settingsSchemas";
test("updateSettingsSchema preserves customSystemPromptEnabled and customSystemPrompt fields", () => {
const input = {
customSystemPromptEnabled: true,
customSystemPrompt: "Always respond politely",
};
const parsed = updateSettingsSchema.parse(input);
assert.equal(parsed.customSystemPromptEnabled, true);
assert.equal(parsed.customSystemPrompt, "Always respond politely");
});