From 093b952a292a9aa651cc1f5be706e0e32dc9156f Mon Sep 17 00:00:00 2001 From: Jesus Velarde Date: Sat, 31 Oct 2026 17:43:36 -0700 Subject: [PATCH] test(ui): pin CLEARED_SSO_SETTINGS to exactly the backend SSOConfig fields With PATCH semantics an omitted key keeps its stored value, so a field missing from the Clear list would silently survive Clear SSO settings --- .../AdminSettings/SSOSettings/utils.test-d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ui/litellm-dashboard/src/components/Settings/AdminSettings/SSOSettings/utils.test-d.ts diff --git a/ui/litellm-dashboard/src/components/Settings/AdminSettings/SSOSettings/utils.test-d.ts b/ui/litellm-dashboard/src/components/Settings/AdminSettings/SSOSettings/utils.test-d.ts new file mode 100644 index 00000000000..c5f50e391ac --- /dev/null +++ b/ui/litellm-dashboard/src/components/Settings/AdminSettings/SSOSettings/utils.test-d.ts @@ -0,0 +1,12 @@ +import { describe, expectTypeOf, test } from "vitest"; + +import type { components } from "@/lib/http/schema"; +import { CLEARED_SSO_SETTINGS } from "./utils"; + +describe("SSO settings utils types", () => { + test("clearing SSO settings sends null for exactly the fields the backend declares", () => { + expectTypeOf(CLEARED_SSO_SETTINGS).toEqualTypeOf<{ + readonly [K in keyof components["schemas"]["SSOConfig"]]-?: null; + }>(); + }); +});