test: speed up doctor config flow tests · openclaw/openclaw@5177180
steipete
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -637,6 +637,54 @@ vi.mock("./doctor/shared/stale-plugin-config.js", () => ({
|
637 | 637 | })), |
638 | 638 | })); |
639 | 639 | |
| 640 | +vi.mock("./doctor/shared/plugin-tool-allowlist-warnings.js", () => ({ |
| 641 | +collectBundledProviderAllowlistPolicyWarnings: vi.fn(() => []), |
| 642 | +collectPluginToolAllowlistWarnings: vi.fn(() => []), |
| 643 | +})); |
| 644 | + |
| 645 | +vi.mock("../doctor-plugin-registry.js", () => ({ |
| 646 | +maybeRepairManagedNpmOpenClawPeerLinks: vi.fn(async () => undefined), |
| 647 | +maybeRepairStaleManagedNpmBundledPlugins: vi.fn(() => undefined), |
| 648 | +})); |
| 649 | + |
| 650 | +vi.mock("../doctor-auth-oauth-sidecar.js", () => ({ |
| 651 | +maybeRepairLegacyOAuthSidecarProfiles: vi.fn(async () => ({ |
| 652 | +detected: [], |
| 653 | +changes: [], |
| 654 | +warnings: [], |
| 655 | +})), |
| 656 | +})); |
| 657 | + |
| 658 | +vi.mock("./doctor/shared/context-engine-host-compat.js", () => ({ |
| 659 | +maybeRepairContextEngineHostCompatibility: vi.fn(async ({ cfg }) => ({ |
| 660 | +config: cfg, |
| 661 | +changes: [], |
| 662 | +})), |
| 663 | +})); |
| 664 | + |
| 665 | +vi.mock("./doctor/shared/missing-configured-plugin-install.js", () => ({ |
| 666 | +repairMissingConfiguredPluginInstalls: vi.fn(async ({ cfg }) => ({ |
| 667 | +config: cfg, |
| 668 | +changes: [], |
| 669 | +warnings: [], |
| 670 | +failedPluginIds: [], |
| 671 | +})), |
| 672 | +})); |
| 673 | + |
| 674 | +vi.mock("./doctor/shared/plugin-dependency-cleanup.js", () => ({ |
| 675 | +cleanupLegacyPluginDependencyState: vi.fn(async () => ({ |
| 676 | +changes: [], |
| 677 | +warnings: [], |
| 678 | +})), |
| 679 | +})); |
| 680 | + |
| 681 | +vi.mock("./doctor/shared/stale-oauth-profile-shadows.js", () => ({ |
| 682 | +repairStaleOAuthProfileShadows: vi.fn(async () => ({ |
| 683 | +changes: [], |
| 684 | +warnings: [], |
| 685 | +})), |
| 686 | +})); |
| 687 | + |
640 | 688 | vi.mock("./doctor/channel-capabilities.js", () => { |
641 | 689 | const byChannel = { |
642 | 690 | googlechat: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。