mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 10:50:29 +00:00
25 lines
758 B
TypeScript
25 lines
758 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveProviderAuthOverview } from "./list.auth-overview.js";
|
|
|
|
describe("resolveProviderAuthOverview", () => {
|
|
it("does not throw when token profile only has tokenRef", () => {
|
|
const overview = resolveProviderAuthOverview({
|
|
provider: "github-copilot",
|
|
cfg: {},
|
|
store: {
|
|
version: 1,
|
|
profiles: {
|
|
"github-copilot:default": {
|
|
type: "token",
|
|
provider: "github-copilot",
|
|
tokenRef: { source: "env", provider: "default", id: "GITHUB_TOKEN" },
|
|
},
|
|
},
|
|
} as never,
|
|
modelsPath: "/tmp/models.json",
|
|
});
|
|
|
|
expect(overview.profiles.labels[0]).toContain("token:ref(env:GITHUB_TOKEN)");
|
|
});
|
|
});
|