Skip to content

Commit 8fc8011

Browse files
committed
test(plugins): preserve metadata snapshot mock surface
1 parent 3c17990 commit 8fc8011

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/plugins/provider-auth-choice-helpers.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import { beforeAll, describe, expect, it } from "vitest";
1+
import { beforeAll, describe, expect, it, vi } from "vitest";
22
import type { OpenClawConfig } from "../config/config.js";
33
import { applyDefaultModel, applyProviderAuthConfigPatch } from "./provider-auth-choice-helpers.js";
44

5+
vi.mock("./plugin-metadata-snapshot.js", async (importOriginal) => {
6+
const actual = await importOriginal<typeof import("./plugin-metadata-snapshot.js")>();
7+
return {
8+
...actual,
9+
resolvePluginMetadataSnapshot: vi.fn((params) => actual.loadPluginMetadataSnapshot(params)),
10+
};
11+
});
12+
513
describe("applyProviderAuthConfigPatch", () => {
614
beforeAll(() => {
715
applyProviderAuthConfigPatch(

0 commit comments

Comments
 (0)