test: narrow provider discovery test imports · openclaw/openclaw@4514691
steipete
·
2026-04-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -820,9 +820,8 @@ describe("loginGeminiCliOAuth", () => {
|
820 | 820 | ); |
821 | 821 | |
822 | 822 | const { requests } = installGeminiOAuthFetchMock(() => undefined); |
823 | | - |
824 | | -const { loginGeminiCliOAuth } = await import("./oauth.js"); |
825 | | -const { result } = await runRemoteLoginWithCapturedAuthUrl(loginGeminiCliOAuth); |
| 823 | +const { exchangeCodeForTokens } = await import("./oauth.token.js"); |
| 824 | +const result = await exchangeCodeForTokens("oauth-code", "pkce-verifier"); |
826 | 825 | |
827 | 826 | expect(result.projectId).toBeUndefined(); |
828 | 827 | expect(requests.map(({ url }) => url)).toEqual([TOKEN_URL, USERINFO_URL]); |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; |
2 | 2 | import type { AuthProfileStore } from "../../../src/agents/auth-profiles/types.js"; |
3 | 3 | import type { OpenClawConfig } from "../../../src/config/config.js"; |
4 | | -import { registerProviders, requireProvider } from "./contracts-testkit.js"; |
| 4 | +import { |
| 5 | +registerProviderPlugins as registerProviders, |
| 6 | +requireRegisteredProvider as requireProvider, |
| 7 | +} from "../../../src/test-utils/plugin-registration.js"; |
5 | 8 | |
6 | 9 | const resolveCopilotApiTokenMock = vi.hoisted(() => vi.fn()); |
7 | 10 | const buildVllmProviderMock = vi.hoisted(() => vi.fn()); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。