













@@ -75,17 +75,13 @@ describe("secrets configure plan helpers", () => {
7575},
7676},
7777});
78-expect(candidates).toEqual(
79-expect.arrayContaining([
80-expect.objectContaining({
81-type: "auth-profiles.api_key.key",
82-path: "profiles.openai:default.key",
83-agentId: "main",
84-configFile: "auth-profiles.json",
85-authProfileProvider: "openai",
86-}),
87-]),
78+const openaiCandidate = candidates.find(
79+(entry) => entry.path === "profiles.openai:default.key",
8880);
81+expect(openaiCandidate?.type).toBe("auth-profiles.api_key.key");
82+expect(openaiCandidate?.agentId).toBe("main");
83+expect(openaiCandidate?.configFile).toBe("auth-profiles.json");
84+expect(openaiCandidate?.authProfileProvider).toBe("openai");
8985});
90869187it("captures existing refs for prefilled configure prompts", () => {
@@ -122,26 +118,23 @@ describe("secrets configure plan helpers", () => {
122118},
123119});
124120125-expect(candidates).toEqual(
126-expect.arrayContaining([
127-expect.objectContaining({
128-path: TALK_TEST_PROVIDER_API_KEY_PATH,
129-existingRef: {
130-source: "env",
131-provider: "default",
132-id: "TALK_API_KEY",
133-},
134-}),
135-expect.objectContaining({
136-path: "profiles.openai:default.key",
137-existingRef: {
138-source: "env",
139-provider: "default",
140-id: "OPENAI_API_KEY", // pragma: allowlist secret
141-},
142-}),
143-]),
121+const talkCandidate = candidates.find(
122+(entry) => entry.path === TALK_TEST_PROVIDER_API_KEY_PATH,
144123);
124+expect(talkCandidate?.existingRef).toStrictEqual({
125+source: "env",
126+provider: "default",
127+id: "TALK_API_KEY",
128+});
129+130+const openaiCandidate = candidates.find(
131+(entry) => entry.path === "profiles.openai:default.key",
132+);
133+expect(openaiCandidate?.existingRef).toStrictEqual({
134+source: "env",
135+provider: "default",
136+id: "OPENAI_API_KEY", // pragma: allowlist secret
137+});
145138});
146139147140it("marks normalized alias paths as derived when not authored directly", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。