

























@@ -7,8 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
77import type { ProviderExternalAuthProfile } from "../../plugins/types.js";
88import {
99testing,
10-overlayExternalOAuthProfiles,
11-shouldPersistExternalOAuthProfile,
10+overlayExternalAuthProfiles,
11+shouldPersistExternalAuthProfile,
1212} from "./external-auth.js";
1313import { readManagedExternalCliCredential } from "./external-cli-sync.js";
1414import type { AuthProfileStore, OAuthCredential } from "./types.js";
@@ -78,7 +78,7 @@ describe("auth external oauth helpers", () => {
7878},
7979]);
808081-const store = overlayExternalOAuthProfiles(createStore());
81+const store = overlayExternalAuthProfiles(createStore());
82828383const profile = requireProfile(store, "openai:default");
8484expect(profile.type).toBe("oauth");
@@ -94,7 +94,7 @@ describe("auth external oauth helpers", () => {
9494};
9595readCodexCliCredentialsCachedMock.mockReturnValueOnce(createCredential());
969697-overlayExternalOAuthProfiles(createStore(), {
97+overlayExternalAuthProfiles(createStore(), {
9898allowKeychainPrompt: false,
9999config: cfg,
100100externalCliProviderIds: ["openai"],
@@ -128,7 +128,7 @@ describe("auth external oauth helpers", () => {
128128}),
129129});
130130131-const overlaid = overlayExternalOAuthProfiles(store);
131+const overlaid = overlayExternalAuthProfiles(store);
132132133133expect(readCodexCliCredentialsCachedMock).not.toHaveBeenCalled();
134134expect(overlaid.profiles["openai:work"]).toEqual(store.profiles["openai:work"]);
@@ -143,7 +143,7 @@ describe("auth external oauth helpers", () => {
143143},
144144]);
145145146-const shouldPersist = shouldPersistExternalOAuthProfile({
146+const shouldPersist = shouldPersistExternalAuthProfile({
147147store: createStore({ "openai:default": credential }),
148148profileId: "openai:default",
149149 credential,
@@ -162,7 +162,7 @@ describe("auth external oauth helpers", () => {
162162},
163163]);
164164165-const shouldPersist = shouldPersistExternalOAuthProfile({
165+const shouldPersist = shouldPersistExternalAuthProfile({
166166store: createStore({ "openai:default": credential }),
167167profileId: "openai:default",
168168 credential,
@@ -180,7 +180,7 @@ describe("auth external oauth helpers", () => {
180180},
181181]);
182182183-const shouldPersist = shouldPersistExternalOAuthProfile({
183+const shouldPersist = shouldPersistExternalAuthProfile({
184184store: createStore({ "openai:default": credential }),
185185profileId: "openai:default",
186186 credential,
@@ -199,7 +199,7 @@ describe("auth external oauth helpers", () => {
199199}),
200200);
201201202-const overlaid = overlayExternalOAuthProfiles(
202+const overlaid = overlayExternalAuthProfiles(
203203createStore({
204204"openai:default": createCredential({
205205access: "stale-store-access-token",
@@ -231,7 +231,7 @@ describe("auth external oauth helpers", () => {
231231} as OAuthCredential;
232232readCodexCliCredentialsCachedMock.mockReturnValue(cliCredential);
233233234-const overlaid = overlayExternalOAuthProfiles(
234+const overlaid = overlayExternalAuthProfiles(
235235createStore({
236236"openai:default": tokenlessCredential,
237237}),
@@ -263,7 +263,7 @@ describe("auth external oauth helpers", () => {
263263}),
264264);
265265266-const overlaid = overlayExternalOAuthProfiles(
266+const overlaid = overlayExternalAuthProfiles(
267267createStore({
268268"openai:default": createCredential({
269269access: "healthy-local-access-token",
@@ -287,7 +287,7 @@ describe("auth external oauth helpers", () => {
287287}),
288288);
289289290-const overlaid = overlayExternalOAuthProfiles(
290+const overlaid = overlayExternalAuthProfiles(
291291createStore({
292292"openai:default": {
293293type: "api_key",
@@ -313,7 +313,7 @@ describe("auth external oauth helpers", () => {
313313}),
314314);
315315316-const overlaid = overlayExternalOAuthProfiles(
316+const overlaid = overlayExternalAuthProfiles(
317317createStore({
318318"openai:default": createCredential({
319319access: "expired-local-access-token",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。