
























@@ -149,8 +149,7 @@ describe("config form renderer", () => {
149149const selectedLabels = Array.from(selects).map((select) =>
150150select.selectedOptions[0]?.textContent?.trim(),
151151);
152-expect(selectedLabels).toContain("openai");
153-expect(selectedLabels).toContain("tailnet");
152+expect(selectedLabels).toEqual(["tailnet", "openai"]);
154153});
155154156155it("renders map fields from additionalProperties", () => {
@@ -334,8 +333,7 @@ describe("config form renderer", () => {
334333},
335334};
336335const analysis = analyzeConfigSchema(schema);
337-expect(analysis.unsupportedPaths).not.toContain("models.providers");
338-expect(analysis.unsupportedPaths).not.toContain("models.providers.*.apiKey");
336+expect(analysis.unsupportedPaths).toEqual([]);
339337340338render(
341339renderConfigForm({
@@ -372,7 +370,7 @@ describe("config form renderer", () => {
372370},
373371};
374372let analysis = analyzeConfigSchema(renderableUnionSchema);
375-expect(analysis.unsupportedPaths).not.toContain("mixed");
373+expect(analysis.unsupportedPaths).toEqual([]);
376374377375const nullableSchema = {
378376type: "object",
@@ -381,7 +379,7 @@ describe("config form renderer", () => {
381379},
382380};
383381analysis = analyzeConfigSchema(nullableSchema);
384-expect(analysis.unsupportedPaths).not.toContain("note");
382+expect(analysis.unsupportedPaths).toEqual([]);
385383386384const untypedAdditionalPropertiesSchema = {
387385type: "object",
@@ -401,7 +399,7 @@ describe("config form renderer", () => {
401399},
402400};
403401analysis = analyzeConfigSchema(untypedAdditionalPropertiesSchema);
404-expect(analysis.unsupportedPaths).not.toContain("channels");
402+expect(analysis.unsupportedPaths).toEqual([]);
405403});
406404407405it("treats additionalProperties true as editable map fields", () => {
@@ -415,7 +413,7 @@ describe("config form renderer", () => {
415413},
416414};
417415const analysis = analyzeConfigSchema(schema);
418-expect(analysis.unsupportedPaths).not.toContain("accounts");
416+expect(analysis.unsupportedPaths).toEqual([]);
419417420418const onPatch = vi.fn();
421419const container = document.createElement("div");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。