

























@@ -619,7 +619,8 @@ describe("runSetupWizard", () => {
619619620620const calls = getWizardNoteCalls(note);
621621expect(calls.length).toBeGreaterThan(0);
622-expect(calls.some((call) => call?.[1] === "Web search")).toBe(true);
622+const noteTitles = calls.map((call) => call?.[1]);
623+expect(noteTitles).toContain("Web search");
623624} finally {
624625if (prevBraveKey === undefined) {
625626delete process.env.BRAVE_API_KEY;
@@ -843,13 +844,13 @@ describe("runSetupWizard", () => {
843844);
844845845846const calls = getWizardNoteCalls(note);
846-expect(calls.some((call) => call?.[1] === "Plugin compatibility")).toBe(true);
847-expect(
848- calls.some((call) => {
849- const body = call?.[0];
850- return typeof body === "string" && body.includes("legacy-plugin");
851- }),
852-).toBe(true);
847+const noteTitles = calls.map((call) => call?.[1]);
848+expect(noteTitles).toContain("Plugin compatibility");
849+const noteBodies = calls
850+.map((call) => call?.[0])
851+.filter((body): body is string => typeof body === "string");
852+const legacyPluginNotes = noteBodies.filter((body) => body.includes("legacy-plugin"));
853+expect(legacyPluginNotes.length).toBeGreaterThan(0);
853854});
854855855856it("resolves gateway.auth.password SecretRef for local setup probe", async () => {
@@ -983,14 +984,13 @@ describe("runSetupWizard", () => {
983984}
984985985986const calls = (note as unknown as { mock: { calls: unknown[][] } }).mock.calls;
986-expect(
987-calls.some(
988-(call) =>
989-call?.[1] === "QuickStart" &&
990-typeof call?.[0] === "string" &&
991-call[0].includes("Gateway port: 18791"),
992-),
993-).toBe(true);
987+const matchingQuickStartNotes = calls.filter(
988+(call) =>
989+call?.[1] === "QuickStart" &&
990+typeof call?.[0] === "string" &&
991+call[0].includes("Gateway port: 18791"),
992+);
993+expect(matchingQuickStartNotes.length).toBeGreaterThan(0);
994994});
995995996996it("uses manifest setup metadata for post-auth model policy without loading provider runtime", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。