test: align plugin metadata test snapshots · openclaw/openclaw@0165560
steipete
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,6 +20,7 @@ const metadataSnapshot = {
|
20 | 20 | workspaceDir: "/resolved-workspace", |
21 | 21 | }; |
22 | 22 | const loadPluginMetadataSnapshotMock = vi.fn(() => metadataSnapshot); |
| 23 | +const getCurrentPluginMetadataSnapshotMock = vi.fn(() => undefined); |
23 | 24 | const setCurrentPluginMetadataSnapshotMock = vi.fn(); |
24 | 25 | |
25 | 26 | let resolvePluginRuntimeLoadContext: typeof import("./load-context.js").resolvePluginRuntimeLoadContext; |
@@ -46,6 +47,7 @@ vi.mock("../plugin-metadata-snapshot.js", () => ({
|
46 | 47 | })); |
47 | 48 | |
48 | 49 | vi.mock("../current-plugin-metadata-snapshot.js", () => ({ |
| 50 | +getCurrentPluginMetadataSnapshot: getCurrentPluginMetadataSnapshotMock, |
49 | 51 | setCurrentPluginMetadataSnapshot: setCurrentPluginMetadataSnapshotMock, |
50 | 52 | })); |
51 | 53 | |
@@ -59,6 +61,7 @@ describe("resolvePluginRuntimeLoadContext", () => {
|
59 | 61 | loadConfigMock.mockReset(); |
60 | 62 | applyPluginAutoEnableMock.mockReset(); |
61 | 63 | loadPluginMetadataSnapshotMock.mockClear(); |
| 64 | +getCurrentPluginMetadataSnapshotMock.mockClear(); |
62 | 65 | setCurrentPluginMetadataSnapshotMock.mockClear(); |
63 | 66 | resolveAgentWorkspaceDirMock.mockClear(); |
64 | 67 | resolveDefaultAgentIdMock.mockClear(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。