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
This commit is contained in:
Jesus Velarde 2026-10-31 17:43:36 -07:00
parent 41079f400c
commit 093b952a29

View file

@ -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;
}>();
});
});